The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Flash Actionscript Q

ProhassProhass Registered User regular
edited April 2007 in Help / Advice Forum
Just a quick Q for Flash actionscript, say I want to do to do the opposite of;
if (_currentframe == 5){
do stuff;
}

to..
if (the previous frame WAS == 6){
do stuff;

Any help would be greatly appreciated!

Prohass on

Posts

  • SzechuanosaurusSzechuanosaurus Registered User, ClubPA regular
    edited April 2007
    Not quite sure I completely understand, but you could just store the current frame as a variable at the end of each frame and then check the previousFrame variable in the next frame.

    So at the end of any actionscript in every frame have
    {[i]whatever[/i]
    }
    
    previousFrame=_currentframe;
    

    then in whatever frame you want to check the value of the previous frame, just call the previousFrame value:
    if (previousFrame == 6){
    doronronronyoudoronron;
    }
    

    Szechuanosaurus on
Sign In or Register to comment.