lundi 23 janvier 2017

How to play animation and then play reverse on hover, start playing again until end on hover out using in Adobe Animate (Flash)?

Sorry this is so specific but I have combed through so many pages and videos and tutorials and can't figure this out.

I have all of my animations within a MovieClip. In the movie clip is also a stage sized white square button with the instance name "btn". Back on the main stage I have a second layer called "actions" with the following code applied to the first (and only) frame. It's not working. At all. (HUGE) tia

stop();  // this will stop the movie from playing at the start

btn.addEventListener((MouseEvent.ROLL_OVER, playMovie);
btn.addEventListener((MouseEvent.ROLL_OUT, stopMovie);

function playMovie(evt:MouseEvent):void {
 play();
}

function stopMovie(evt:MouseEvent):void {
 stop();
}

Aucun commentaire:

Enregistrer un commentaire