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.

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

Paramètres<br />

frame:Object - Nombre représentant le numéro d'image ou une chaîne représentant<br />

l'étiquette <strong>de</strong> l'image cible <strong>de</strong> la tête <strong>de</strong> lecture.<br />

Exemple<br />

L'exemple suivant utilise la propriété _framesloa<strong>de</strong>d pour activer un fichier SWF lorsque<br />

toutes les images sont chargées. Si certaines images ne sont pas chargées, la propriété _xscale<br />

<strong>de</strong> l'occurrence <strong>de</strong> clip loa<strong>de</strong>r est augmentée proportionnellement pour créer une barre <strong>de</strong><br />

progression.<br />

Entrez le co<strong>de</strong> <strong>ActionScript</strong> suivant sur l'image 1 <strong>du</strong> scénario :<br />

var pctLoa<strong>de</strong>d:Number = Math.round(this.getBytesLoa<strong>de</strong>d()/<br />

this.getBytesTotal()*100);<br />

bar_mc._xscale = pctLoa<strong>de</strong>d;<br />

Ajoutez le co<strong>de</strong> suivant sur l'image 2 :<br />

if (this._framesloa<strong>de</strong>d

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

Saved successfully!

Ooh no, something went wrong!