running a movie backwards

  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Joined: Feb 05, 2004
  • Posts: 33
  • Loc: chicago
  • Status: Offline

Post March 17th, 2004, 6:23 pm

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 17th, 2004, 6:23 pm

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post March 17th, 2004, 11:15 pm

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 41 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.