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.setTextFormat(myformat);<br />

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

public url : String<br />

Indique l'URL à laquelle relie le texte <strong>de</strong> ce format texte. Si la propriété url est une chaîne<br />

vi<strong>de</strong>, le texte ne comporte pas d'hyperlien. La valeur par défaut est null, ce qui indique que la<br />

propriété n'est pas définie.<br />

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

Exemple<br />

Cet exemple crée un champ texte constituant un hyperlien qui pointe vers le site Web <strong>de</strong><br />

Macromedia.<br />

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

myformat.url = "http://www.macromedia.com";<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 />

TextRen<strong>de</strong>rer (flash.text.TextRen<strong>de</strong>rer)<br />

Object<br />

|<br />

+-flash.text.TextRen<strong>de</strong>rer<br />

public class TextRen<strong>de</strong>rer<br />

extends Object<br />

La classe TextRen<strong>de</strong>rer permet d'exploiter la fonction avancée d'anti-aliasing <strong>de</strong>s polices<br />

incorporées. L'anti-aliasing avancé permet d'obtenir un ren<strong>du</strong> très précis <strong>de</strong>s polices <strong>de</strong> petite<br />

taille. Utilisez l'anti-aliasing avancé avec les applications comportant beaucoup <strong>de</strong> texte <strong>de</strong><br />

petite taille. Macromedia ne recomman<strong>de</strong> pas l'utilisation <strong>de</strong> l'anti-aliasing avancé pour les<br />

polices <strong>de</strong> très gran<strong>de</strong> taille (supérieures à 48 points). L'anti-aliasing avancé est uniquement<br />

disponible sous Flash Player 8.<br />

Pour définir l'anti-aliasing avancé sur un champ texte, définissez la propriété antiAliasType<br />

<strong>de</strong> l'occurrence TextField. Les exemples suivants nécessitent une police partagée dans la<br />

bibliothèque avec un i<strong>de</strong>ntifiant <strong>de</strong> liaison appelé "CustomFont".<br />

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

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

Saved successfully!

Ooh no, something went wrong!