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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Voir également<br />

TextFormat, setNewTextFormat (métho<strong>de</strong> TextField.setNewTextFormat)<br />

onKillFocus (gestionnaire TextField.onKillFocus)<br />

onKillFocus = function(newFocus:Object) {}<br />

Appelé lorsqu'un champ texte perd le focus clavier. La métho<strong>de</strong> onKillFocus reçoit un<br />

paramètre, newFocus : il s'agit d'un objet représentant le nouvel objet recevant le focus. Si<br />

aucun objet ne reçoit le focus, newFocus contient la valeur null.<br />

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

Paramètres<br />

newFocus:Object - Objet qui reçoit le focus.<br />

Exemple<br />

L'exemple suivant crée <strong>de</strong>ux champs texte, appelés first_txt et second_txt. Lorsque vous<br />

donnez le focus à un champ texte, les informations relatives à ce champ texte et au champ<br />

texte ayant per<strong>du</strong> le focus s'affichent dans le panneau <strong>de</strong> sortie.<br />

this.createTextField("first_txt", 1, 10, 10, 300, 20);<br />

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

first_txt.type = "input";<br />

this.createTextField("second_txt", 2, 10, 40, 300, 20);<br />

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

second_txt.type = "input";<br />

first_txt.onKillFocus = function(newFocus:Object) {<br />

trace(this._name+" lost focus. New focus changed to: "+newFocus._name);<br />

};<br />

first_txt.onSetFocus = function(oldFocus:Object) {<br />

trace(this._name+" gained focus. Old focus changed from:<br />

"+oldFocus._name);<br />

}<br />

Voir également<br />

onSetFocus (gestionnaire TextField.onSetFocus)<br />

onScroller (gestionnaire TextField.onScroller)<br />

onScroller = function(scrolledField:TextField) {}<br />

Gestionnaire d'événements/écouteur : appelé lorsque l'une <strong>de</strong>s propriétés <strong>de</strong> défilement <strong>du</strong><br />

champ texte est modifiée.<br />

TextField 1237

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

Saved successfully!

Ooh no, something went wrong!