Son sur RollOver

jeep501 Messages postés 96 Date d'inscription mardi 18 mars 2003 Statut Membre Dernière intervention 3 janvier 2012 - 5 janv. 2008 à 20:30
bilouts Messages postés 51 Date d'inscription dimanche 15 août 2004 Statut Membre Dernière intervention 16 janvier 2009 - 6 janv. 2008 à 03:06
Bonjour,

J'ai le code suivant :

import mx.transitions.Tween;
import mx.transitions.easing.*;
//
photo1._xscale=photo1._yscale=25;
function transPlus() {
    T1= new Tween(this, "_xscale", Strong.easeOut, 25, 100, 1, true);
    T2= new Tween(this, "_yscale", Strong.easeOut, 25, 100, 1, true);
}
function transMoins() {
    T1.continueTo(25,T1.time);
    T2.continueTo(25,T2.time);
   
}
//
photo1.onRollOver = transPlus;
photo1.onRollOut = transMoins;
stop();

Mon probleme :

Comment ajouter "un son" en rollover sur photo1 une fois qu'on a mis

photo1.onRollOver = transPlus;

J'arrive pas et je vois pas comment faire !

Merci d'avance
jeep501

1 réponse

bilouts Messages postés 51 Date d'inscription dimanche 15 août 2004 Statut Membre Dernière intervention 16 janvier 2009
6 janv. 2008 à 03:06
Salut,


peut être en rajoutant sur le clip de ton image dans la fenetre action un

onClipEvent(load)

{

_global.monSon=new Sound();

_global.monSon.attachSound("monSonDansBiblio");

_global.monSon.setVolume(100);// pour régler ton volume
}

on(rollOver)

{

_global.monSon.start(0,1);

}

on(rollOut)

{

_global.monSon.stop();

}


et pour la definition de ton son, regarde ça
0
Rejoignez-nous