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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

setVolume (métho<strong>de</strong> Sound.setVolume)<br />

public setVolume(value:Number) : Void<br />

Définit le volume pour l'objet Sound.<br />

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

Paramètres<br />

value:Number - Nombre compris entre 0 et 100 et représentant un niveau <strong>de</strong> volume. 100<br />

correspond au volume maximum et 0 à muet. Le paramètre par défaut est 100.<br />

Exemple<br />

Consultez Sound.getVolume() pour obtenir un exemple d'utilisation <strong>de</strong> cette métho<strong>de</strong>.<br />

Voir également<br />

setPan (métho<strong>de</strong> Sound.setPan), setTransform (métho<strong>de</strong> Sound.setTransform)<br />

Sound, constructeur<br />

public Sound([target:Object])<br />

Crée un nouvel objet Sound pour un clip spécifique. Si vous ne spécifiez pas d'occurrence<br />

cible, l'objet Sound contrôle tous les sons <strong>de</strong> l'animation.<br />

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

Paramètres<br />

target:Object [facultatif] - Occurrence <strong>de</strong> clip sur laquelle porte l'objet Sound.<br />

Exemple<br />

L'exemple suivant crée un nouvel objet Sound appelé global_sound. La <strong>de</strong>uxième ligne<br />

appelle setVolume() et règle le volume <strong>de</strong> l'ensemble <strong>de</strong>s sons <strong>de</strong> l'animation sur 50 %.<br />

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

global_sound.setVolume(50);<br />

L'exemple suivant crée un nouvel objet Sound, le transmet au clip cible my_mc et appelle la<br />

métho<strong>de</strong> start, ce qui active tout son présent dans my_mc.<br />

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

movie_sound.start();<br />

Sound 1155

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

Saved successfully!

Ooh no, something went wrong!