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

stop (Sound.stop method)<br />

stop (Sound.stop method)<br />

public stop([linkageID:String]) : Void<br />

Arrête tous les sons en cours <strong>de</strong> lecture si aucun paramètre n'est spécifié, ou uniquement le<br />

son spécifié dans le paramètre idName.<br />

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

Paramètres<br />

linkageID:String [facultatif] - Paramètre spécifiant un son dont vous <strong>de</strong>vez arrêter la<br />

diffusion. Le paramètre idName doit figurer entre guillemets (" ").<br />

Exemple<br />

L'exemple suivant utilise <strong>de</strong>ux boutons, stop_btn et play_btn, pour contrôler la lecture d'un<br />

son qui se charge dans un fichier SWF. Ajoutez <strong>de</strong>ux boutons à votre document et ajoutez le<br />

co<strong>de</strong> <strong>ActionScript</strong> suivant à votre fichier FLA ou AS :<br />

var my_sound:Sound = new Sound();<br />

my_sound.loadSound("song1.mp3", true);<br />

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

trace("sound stopped");<br />

my_sound.stop();<br />

};<br />

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

trace("sound started");<br />

my_sound.start();<br />

};<br />

Voir également<br />

start (Sound.start method)<br />

Scène<br />

Object<br />

|<br />

+-Stage<br />

public class Stage<br />

extends Object<br />

Scène 1157

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

Saved successfully!

Ooh no, something went wrong!