Sonoriser un movieclip au comportement de bouton

GravierSantaCruz Messages postés 5 Date d'inscription lundi 10 mai 2004 Statut Membre Dernière intervention 1 juin 2004 - 1 juin 2004 à 21:18
jdeboer Messages postés 254 Date d'inscription mardi 25 mars 2003 Statut Membre Dernière intervention 4 février 2006 - 3 juin 2004 à 19:48
j'ai un movie clip qui sert de bouton avec les actions suivantes : je veux un bouton genre commutateur on/off.

[image 1 : ]
stop();
this.onPress = function(){
gotoAndStop(2);
}

[image 2 : ]
stop();
this.onPress = function(){
gotoAndStop(1);
}

Le truc c que je voudrais sonoriser le movieclip comme si c'était un bouton. Comment faire???
Merci d'avance

1 réponse

jdeboer Messages postés 254 Date d'inscription mardi 25 mars 2003 Statut Membre Dernière intervention 4 février 2006
3 juin 2004 à 19:48
importe ton mp3/wav qui servira de clic. Tu peux telecharger sur flashkit.com.

Click droit sur le nom de ton son dans la biblio, "Liaison" , puis tape un nom (ex: "clic") et check la box "Importer pour ActionScript".

Ensuite, dans la premiere image tape:
clic = new Sound()
clic.attachSound("clic")

puis:

[image 1 : ]
stop();
this.onPress = function(){
clic.start(0,1)
gotoAndStop(2);
}

[image 2 : ]
stop();
this.onPress = function(){
clic.start(0,1)
gotoAndStop(1);
}
0
Rejoignez-nous