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.

trace(myAssocArray.fname); // Output: John<br />

trace(myAssocArray["lname"]); // Output: Public<br />

myAssocArray.initial = "Q";<br />

trace(myAssocArray.initial); // Output: Q<br />

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

Exemple<br />

Dans l'exemple suivant, my_array contient quatre mois <strong>de</strong> l'année :<br />

var my_array:Array = new Array();<br />

my_array[0] = "January";<br />

my_array[1] = "February";<br />

my_array[2] = "March";<br />

my_array[3] = "April";<br />

Résumé <strong>de</strong>s propriétés<br />

Modificateurs Propriété Description<br />

static CASEINSENSITIVE:Numb<br />

er<br />

Propriétés héritées <strong>de</strong> la classe Object<br />

Résumé <strong>de</strong>s constructeurs<br />

Dans les métho<strong>de</strong>s <strong>de</strong> tri, cette constante spécifie le tri<br />

non sensible à la casse.<br />

static DESCENDING:Number Dans les métho<strong>de</strong>s <strong>de</strong> tri, cette constante spécifie<br />

l'ordre <strong>de</strong> tri décroissant.<br />

length:Number Un entier non négatif spécifiant le nombre d'éléments<br />

contenus dans le tableau.<br />

static NUMERIC:Number Dans les métho<strong>de</strong>s <strong>de</strong> tri, cette constante spécifie le tri<br />

numérique (au lieu <strong>de</strong> la chaîne <strong>de</strong> caractères).<br />

static RETURNINDEXEDARRAY:N<br />

umber<br />

Spécifie qu'un tri renvoie un tableau in<strong>de</strong>xé résultant<br />

<strong>de</strong> l'appel <strong>de</strong> la métho<strong>de</strong> sort() ou sortOn().<br />

static UNIQUESORT:Number Dans les métho<strong>de</strong>s <strong>de</strong> tri, cette constante spécifie<br />

l'unique exigence <strong>de</strong> tri.<br />

constructeur (propriété Object.constructor), __proto__ (Object.__proto__<br />

property), prototype (Object.prototype, propriété), __resolve<br />

(Object.__resolve, propriété)<br />

Signature Description<br />

Array([value:Object] Permet <strong>de</strong> créer un tableau.<br />

)<br />

Array 251

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

Saved successfully!

Ooh no, something went wrong!