A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Last Fame Code?

  1. #1

    Last Fame Code?

    I need help making a code for my game. When you lose a man it goes to frame 20 ( "manlost" ) and I want it to go to the frame you were last at, when you click "continue". Each frame is a level, starting @ 2. Thanks for your help if there is such a code.

  2. #2
    skylogic.ca MD004's Avatar
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    366
    On each frame you could go: lastLevel = _currentFrame;
    Then on your frame 20 you could go: gotoAndStop(lastLevel);

    ~MD

  3. #3
    President PhobiK's Avatar
    Join Date
    Jan 2005
    Location
    Guatemala
    Posts
    918
    you can make a variable that stores the last frame you were in for example:

    This should written in the actions when you loose a man, where it says to go to "manlost"
    Code:
    _root.frameToGo = _root._currentframe;
    _root.gotoAndStop("manlost");
    Then when you want to go back to the last frame where you were, for example using a button you should write:
    Code:
    on (release){
    _root.gotoAndStop(_root.frameToGo);
    }
    And that's it!
    This is MC. His _parents sent him to stop() by the super market to buy some _root beer if he wanted to gotoAndPlay() with his friends at the park later.

    This is my Blog!... The gaming Process
    Please check out my site: Giddel Creations

  4. #4
    Thanks it works great

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center