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 />

toString (métho<strong>de</strong> Number.toString), toString (métho<strong>de</strong> Object.toString),<br />

String, Opérateur " (séparateur <strong>de</strong> chaîne)<br />

Fonction substring<br />

substring(string:String, in<strong>de</strong>x:Number, count:Number) : String<br />

Déconseillée à partir <strong>de</strong> Flash Player 5. Il est recommandé d'utiliser la métho<strong>de</strong><br />

String.substr().<br />

Extrait une partie d'une chaîne. Cette fonction est <strong>de</strong> base un tandis que les métho<strong>de</strong>s <strong>de</strong><br />

l'objet String sont <strong>de</strong> base zéro.<br />

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

Paramètres<br />

string:String - La chaîne à partir <strong>de</strong> laquelle il convient d'extraire la nouvelle chaîne.<br />

in<strong>de</strong>x:Number - Le numéro <strong>du</strong> premier caractère à extraire.<br />

count:Number - Le nombre <strong>de</strong> caractères à inclure dans la chaîne extraite, caractère d'indice<br />

non compris.<br />

Renvoie<br />

String - La sous-chaîne extraite.<br />

Voir également<br />

substr (métho<strong>de</strong> String.substr)<br />

Fonction targetPath<br />

targetpath(targetObject:Object) : String<br />

Renvoie une chaîne contenant le chemin cible d'un objet MovieClip, Button, TextField ou<br />

Vi<strong>de</strong>o. Le chemin cible est renvoyé sous forme <strong>de</strong> notation par point (.). Pour extraire le<br />

chemin cible sous forme <strong>de</strong> notation à barre oblique (/), utilisez la propriété _target.<br />

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

Paramètres<br />

targetObject:Object - Référence (par exemple, _root ou _parent) à l'objet pour lequel le<br />

chemin cible est extrait. Il peut s'agir d'un objet MovieClip, Button ou TextField.<br />

110 Chapitre 1: Eléments <strong>du</strong> <strong>langage</strong> <strong>ActionScript</strong>

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

Saved successfully!

Ooh no, something went wrong!