View Single Post
  #22 (permalink)  
Old 03-06-2008, 05:55 AM
aramesh aramesh is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 72
aramesh is on a distinguished road
Default Re: Flash Tips & Tricks

We have a design with animated MovieClip’s for buttons. When the user rolls the mouse over the MovieClip it is told to play(). That much works fine but we would like to play that same animation backwards when the user moves the mouse off the MovieClip.

Here’s the gist of a solution: create a onRollOut function that creates an onEnterFrame function to tell the timeline to gotoAndStop on the ( _currentframe - 1 ). Continually test to see if _currentframe == 1. If it does then delete the onEnterFrame so that it doesn’t waist processing cycles.

Regards,

A.Ramesh
Reply With Quote