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.

ight:Number [facultatif] - Valeur relative aux coordonnées <strong>du</strong> parent <strong>du</strong> clip qui spécifie un<br />

rectangle <strong>de</strong> délimitation pour le clip.<br />

bottom:Number [facultatif] - Valeur relative aux coordonnées <strong>du</strong> parent <strong>du</strong> clip qui spécifie<br />

un rectangle <strong>de</strong> délimitation pour le clip.<br />

Exemple<br />

L'exemple suivant crée une occurrence déplaçable <strong>de</strong> clip appelée mc_1:<br />

this.createEmptyMovieClip("mc_1", 1);<br />

with (mc_1) {<br />

lineStyle(1, 0xCCCCCC);<br />

beginFill(0x4827CF);<br />

moveTo(0, 0);<br />

lineTo(80, 0);<br />

lineTo(80, 60);<br />

lineTo(0, 60);<br />

lineTo(0, 0);<br />

endFill();<br />

}<br />

mc_1.onPress = function() {<br />

this.startDrag();<br />

};<br />

mc_1.onRelease = function() {<br />

this.stopDrag();<br />

};<br />

Voir également<br />

_droptarget (propriété MovieClip._droptarget), Fonction startDrag, stopDrag<br />

(métho<strong>de</strong> MovieClip.stopDrag)<br />

stop (métho<strong>de</strong> MovieClip.stop)<br />

public stop() : Void<br />

Arrête le clip en cours <strong>de</strong> lecture.<br />

Vous pouvez étendre les métho<strong>de</strong>s et les gestionnaires d'événements <strong>de</strong> la classe MovieClip en<br />

créant une sous-classe.<br />

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

Exemple<br />

L'exemple suivant indique comment arrêter un clip appelé aMovieClip:<br />

aMovieClip.stop();<br />

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

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

Saved successfully!

Ooh no, something went wrong!