A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Button Scripting Question

  1. #1
    Junior Member
    Join Date
    Mar 2002
    Posts
    20
    Is there any way to add scripting to a button that allows the user to go back to the last seen frame - like the way the back button on the browser works?


  2. #2
    United States Presidential Hopeful in 2028
    Join Date
    Dec 2000
    Posts
    756
    It would require scripting on both the navigation buttons and the back button that you have created in Flash (not the browsers back button).

    The navigation buttons would need to set a variable based on the frame they are in. (i.e. lastFrame=5) So when a navigation button in the fifth frame is pressed, lastFrame is set to 5.

    Then the back button would just have gotoAndStop(lastFrame). The variable value would determine where the back button sends the movie. Make sure you have expression checked in the back buttons actions.

    If you think of another way to set the variable, like using frame actions for example, then it will work as well. However, the variable cannot be set until Flash is leaving the previous frame so using frame actions may be difficult.

  3. #3
    Junior Member
    Join Date
    Mar 2002
    Posts
    20
    I think I actually understand what I need to do now - but if you get a chance can you tell me the code I would need to use to do this. I am new to action scripting and am doing a project for work. I have bought two books but still can't seem to make it work. Thanks again.

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