03.07.2013 Views

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

■ Sélectionnez « Times New Roman » dans le menu déroulant<br />

■ Appuyez sur le bouton « OK »<br />

■ Cliquez <strong>du</strong> bouton droit sur la nouvelle police créée et sélectionnez « Liaison... »<br />

■ Cochez la case « Exporter pour <strong>ActionScript</strong> »<br />

■ Acceptez l'i<strong>de</strong>ntifiant par défaut « Times-12 » en appuyant sur le bouton « OK »<br />

var my_format:TextFormat = new TextFormat();<br />

my_format.font = "Times-12";<br />

var my_text1:TextField = this.createTextField("my_text1",<br />

this.getNextHighestDepth(), 10, 10, 300, 30);<br />

my_text1.text = "thickness = 200";<br />

my_text1.antiAliasType = "advanced";<br />

my_text1.bor<strong>de</strong>r = true;<br />

my_text1.thickness = 200;<br />

my_text1.embedFonts = true;<br />

my_text1.setTextFormat(my_format);<br />

var my_text2:TextField = this.createTextField("my_text2",<br />

this.getNextHighestDepth(), 10, 50, 300, 30);<br />

my_text2.text = "thickness = -200."<br />

my_text2.antiAliasType = "advanced";<br />

my_text2.thickness = -200;<br />

my_text2.bor<strong>de</strong>r = true;<br />

my_text2.embedFonts = true;<br />

my_text2.setTextFormat(my_format);<br />

Si votre fichier SWF comporte un composant <strong>de</strong> la version 2, utilisez la classe DepthManager<br />

<strong>de</strong>s composants <strong>de</strong> la version 2 au lieu <strong>de</strong> la métho<strong>de</strong> MovieClip.getNextHighestDepth(),<br />

utilisée dans cet exemple.<br />

Voir également<br />

antiAliasType (propriété TextField.antiAliasType)<br />

type (propriété TextField.type)<br />

public type : String<br />

Spécifie le type <strong>de</strong> champ texte. Il existe <strong>de</strong>ux valeurs : "dynamic", qui spécifie un champ<br />

texte dynamique qui ne peut pas être modifié par l'utilisateur et "input", qui spécifie un<br />

champ texte <strong>de</strong> saisie.<br />

Disponibilité : <strong>ActionScript</strong> 1.0 ; <strong>ActionScript</strong> 1.0 ; Flash Player 6<br />

1264 Chapitre 2: Classes <strong>ActionScript</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!