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.

txtField.wordWrap = true;<br />

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

txtField.text = "When this text is justified, it will be "<br />

+ "spread out to more cleanly fill the horizontal "<br />

+ "space for each line. This can be consi<strong>de</strong>red an "<br />

+ "improvement over regular left-aligned text that "<br />

+ "will simply wrap and do no more.";<br />

txtField.setTextFormat(format);<br />

La métho<strong>de</strong> MovieClip.getNextHighestDepth() utilisée dans cet exemple requiert Flash<br />

Player 7 ou version ultérieure. Si votre fichier SWF comporte un composant <strong>de</strong> la version 2,<br />

utilisez la classe DepthManager <strong>de</strong>s composants <strong>de</strong> la version 2 au lieu <strong>de</strong> la métho<strong>de</strong><br />

MovieClip.getNextHighestDepth().<br />

blockIn<strong>de</strong>nt (propriété TextFormat.blockIn<strong>de</strong>nt)<br />

public blockIn<strong>de</strong>nt : Number<br />

Nombre indiquant l'in<strong>de</strong>ntation d'un bloc en points. L'in<strong>de</strong>ntation d'un bloc est appliquée à<br />

l'ensemble d'un bloc <strong>de</strong> texte ; c'est-à-dire à toutes les lignes <strong>du</strong> texte. Par contraste,<br />

l'in<strong>de</strong>ntation normale (TextFormat.in<strong>de</strong>nt) affecte seulement la première ligne <strong>de</strong> chaque<br />

paragraphe. Si cette propriété est null, l'objet TextFormat ne spécifie pas l'in<strong>de</strong>ntation d'un<br />

bloc.<br />

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

Exemple<br />

Cet exemple crée un champ texte avec une bor<strong>du</strong>re et définit blockIn<strong>de</strong>nt sur 20.<br />

this.createTextField("mytext",1,100,100,100,100);<br />

mytext.multiline = true;<br />

mytext.wordWrap = true;<br />

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

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

myformat.blockIn<strong>de</strong>nt = 20;<br />

mytext.text = "This is my first test field object text";<br />

mytext.setTextFormat(myformat);<br />

bold (propriété TextFormat.bold)<br />

public bold : Boolean<br />

Valeur booléenne indiquant si le texte est en gras. La valeur par défaut est null, ce qui indique<br />

que la propriété n'est pas définie. Si la valeur est true, le texte est en gras.<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!