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.

eak;<br />

case 'Lowercase...' :<br />

tempString += target.text.substring(beginIn<strong>de</strong>x,<br />

endIn<strong>de</strong>x).toLowerCase();<br />

break;<br />

}<br />

// append the text after the selected text to the temporary string.<br />

tempString += target.text.slice(endIn<strong>de</strong>x);<br />

// set the text in the target text field to the contents of the temporary<br />

string.<br />

target.text = tempString;<br />

}<br />

}<br />

Reportez-vous au fichier Strings.fla pour l'ensemble <strong>du</strong> script. Les chemins type <strong>du</strong> dossier<br />

d'exemples <strong>ActionScript</strong> sont :<br />

■ Windows : lecteur d'amorçage\Program Files\Macromedia\Flash 8\Samples and<br />

Tutorials\Samples\<strong>ActionScript</strong><br />

■ Macintosh : disque <strong>du</strong>r Macintosh/Applications/Macromedia Flash 8/Samples and<br />

Tutorials/Samples/<strong>ActionScript</strong><br />

Voir également<br />

getBeginIn<strong>de</strong>x (métho<strong>de</strong> Selection.getBeginIn<strong>de</strong>x)<br />

getFocus (métho<strong>de</strong> Selection.getFocus)<br />

public static getFocus() : String<br />

Renvoie une chaîne spécifiant le chemin cible <strong>de</strong> l'objet ayant le focus.<br />

■ Si un objet TextField a le focus et dispose d'un nom d'occurrence, cette métho<strong>de</strong> renvoie<br />

le chemin cible <strong>de</strong> l'objet TextField. Sinon, elle renvoie le nom <strong>de</strong> la variable <strong>de</strong> l'objet<br />

TextField.<br />

■ Si un objet bouton ou le clip d'un bouton a le focus, cette métho<strong>de</strong> renvoie le chemin<br />

cible <strong>de</strong> l'objet bouton ou <strong>du</strong> clip <strong>du</strong> bouton.<br />

■ Si ni un objet TextField, ni un bouton, une occurrence <strong>de</strong> composant ou un clip <strong>de</strong><br />

bouton n'a le focus, cette métho<strong>de</strong> renvoie la valeur null.<br />

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

Valeur renvoyée<br />

String - Chaîne ou null.<br />

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

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

Saved successfully!

Ooh no, something went wrong!