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.

Renvoie<br />

Object - La valeur <strong>de</strong> la propriété spécifiée.<br />

Exemple<br />

L'exemple suivant crée un nouveau clip someClip_mc et affiche la valeur alpha (_alpha) <strong>du</strong><br />

clip someClip_mc dans le panneau <strong>de</strong> sortie :<br />

this.createEmptyMovieClip("someClip_mc", 999);<br />

trace("The alpha of "+getProperty(someClip_mc, _name)+" is:<br />

"+getProperty(someClip_mc, _alpha));<br />

Fonction getTimer<br />

getTimer() : Number<br />

Renvoie le nombre <strong>de</strong> millisecon<strong>de</strong>s qui se sont écoulées <strong>de</strong>puis le début <strong>de</strong> la lecture <strong>du</strong><br />

fichier SWF.<br />

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

Renvoie<br />

Number - Le nombre <strong>de</strong> millisecon<strong>de</strong>s qui se sont écoulées <strong>de</strong>puis le début <strong>de</strong> la lecture <strong>du</strong><br />

fichier SWF.<br />

Exemple<br />

Dans l'exemple suivant, les fonctions getTimer() et setInterval() sont utilisées pour créer<br />

un minuteur simple :<br />

this.createTextField("timer_txt", this.getNextHighestDepth(), 0, 0, 100,<br />

22);<br />

function updateTimer():Void {<br />

timer_txt.text = getTimer();<br />

}<br />

var intervalID:Number = setInterval(updateTimer, 100);<br />

Fonction getURL<br />

getURL(url:String, [window:String, [method:String]]) : Void<br />

Charge un document en provenance d'une URL spécifique dans une fenêtre ou transmet <strong>de</strong>s<br />

variables à une autre application à une URL donnée. Pour tester cette fonction, assurez-vous<br />

que le fichier à charger existe à l'emplacement prévu. Pour utiliser une URL absolue (par<br />

exemple, http://www.myserver.com), vous <strong>de</strong>vez disposer d'une connexion réseau.<br />

62 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!