I'm A Flash Spastik

Out of context: Reply #4

  • Started
  • Last post
  • 6 Responses
  • UndoUndo0

    right I'm with yr.

    define a function that targets a specific frame in a scene. Call the function at the end of the animation and pass a variable value [the new scene name]to the function.

    set the variable value when you click on the button.

    ie.
    //define variable
    _global.nextScene;
    //btn function
    _root.myBtn.onPress = function(){
    _global.nextScene = "Scene2"
    }
    // function to be called at the end of each scene
    _global.nxtScene = function(nextScene){
    _root.gotoAndPlay(nextScene, 1)
    }

    you can substitute the number 1 for the frame number you want the playhead to goto in the new scene

    :)

View thread