Réponse acceptée !
Salut,
Je comprend pas bien le rapport entre ton code et ta question ....
bouton.addEventListener(MouseEvent.MOUSE_OVER, declanchAnim1);
//quand on passe dessus déclenche une animation (anime1)
bouton.addEventListener(MouseEvent.CLICK, declanchAnim2);
//quand on click ça déclenche une autre animation (anime2)
bouton.addEventListener(MouseEvent.MOUSE_OUT, rambobinAnim2);
//quand on enlève la souris l'animation se rambobine (anime2)
function declanchAnim1(e:Event):void {
anime2.removeEventListener(Event.ENTER_FRAME, rambobinAnim2);
anime1.play();
}
function declanchAnim2(e:Event):void {
anime2.removeEventListener(Event.ENTER_FRAME, rambobinAnim2);
anime2.play();
}
function rambobinAnim2(e:Event):void {
anime2.addEventListener(Event.ENTER_FRAME, rambobinAnim2);
anime2.prevFrame();
}
@+.
telov.ch