running a movie backwards

  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Posts: 33
  • Loc: chicago

Post 3+ Months Ago

is there a way to run a movie backwards. for instance. I have a drop down menu that pulls back up.


just trying to cut corners

ryan
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Code: [ Select ]
targeTimeline.onEnterFrame = function(){
if (this._currentframe > beginningFrameNumber){
this.prevFrame;
} else {
delete this.onEnterFrame;
}
  1. targeTimeline.onEnterFrame = function(){
  2. if (this._currentframe > beginningFrameNumber){
  3. this.prevFrame;
  4. } else {
  5. delete this.onEnterFrame;
  6. }


Basic explanation:

Target a timeline and run an onEnterFrame command so the code will be run upon entry of each frame... repeatedly. It uses an if statement to check if the _currentframe (timeline property) is higher than the frame number that your animation starts on. If it is higher, it uses the prevFrame() function (built in function in Flash) to goto the previous frame in the timeilne. if the _current frame isn't higher than the number of the beginning frame of the animation, then it deletes the onEnterFrame command thus stopping the code from running.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 22 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.