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.

mytext.text = "A\tB\tC\tD"; // \t is the tab stop character<br />

mytext.setTextFormat(myformat);<br />

this.createTextField("mytext2",2,100,220,400,100);<br />

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

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

myformat2.tabStops = [75,150,225,300];<br />

mytext2.text ="A\tB\tC\tD";<br />

mytext2.setTextFormat(myformat2);<br />

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

public target : String<br />

Indique la fenêtre cible dans laquelle s'affiche l'hyperlien. Si la fenêtre cible est une chaîne<br />

vi<strong>de</strong>, le texte s'affiche dans la fenêtre cible par défaut _self. Vous pouvez choisir un nom<br />

personnalisé ou l'un <strong>de</strong>s quatre noms suivants : _self spécifie l'image actuelle dans la fenêtre<br />

actuelle, _blank spécifie une nouvelle fenêtre, _parent spécifie le parent <strong>de</strong> l'image actuelle et<br />

_top spécifie l'image <strong>de</strong> plus haut niveau dans la fenêtre active. Si la propriété<br />

TextFormat.url est une chaîne vi<strong>de</strong> ou null, vous pouvez obtenir ou définir cette propriété,<br />

mais la propriété n'aura aucun effet.<br />

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

Exemple<br />

L'exemple suivant crée un champ texte incluant un hyperlien pointant vers le site Web <strong>de</strong><br />

Macromedia. Cet exemple utilise TextFormat.target pour afficher le site Web <strong>de</strong><br />

Macromedia dans une nouvelle fenêtre <strong>de</strong> navigateur.<br />

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

myformat.url = "http://www.macromedia.com";<br />

myformat.target = "_blank";<br />

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

mytext.multiline = true;<br />

mytext.wordWrap = true;<br />

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

mytext.html = true;<br />

mytext.text = "Go to Macromedia.com";<br />

mytext.setTextFormat(myformat);<br />

Voir également<br />

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

TextFormat 1287

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

Saved successfully!

Ooh no, something went wrong!