Bonjour à tous,
Je cherche à décaler la lecture du son de 1 ou 2 secondes au passage de la souris sur un bouton, voici l'actionscript inseré sur un bouton transparent :
on (rollOver) {
//Play Internal Sound Behavior
if(_global.Behaviors == null)_global.Behaviors = {};
if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
if(typeof this.createEmptyMovieClip == 'undefined'){
this._parent.createEmptyMovieClip('BS_mp3',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.mp3 = new Sound(this._parent.BS_mp3);
} else {
this.createEmptyMovieClip('_mp3_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.mp3 = new Sound(this.BS_mp3);
}
_global.Behaviors.Sound.mp3.attachSound("son.mp3");
if (true) {
_global.Behaviors.Sound.mp3.start(0,1);
}
//End Behavior
}
on (rollOut) {
//stopAllSounds Behavior
stopAllSounds();
}
J'ai pu voir sur les forums qu'il existait une fonction SetInterval, mais aucune idée de la façon dont je dois la paramétrer ni même à quel endroit l'intégrer. Et oui je suis un gros NewBie...
