A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Change Scenes

Hybrid View

  1. #1
    Junior Member
    Join Date
    Sep 2004
    Posts
    5

    Change Scenes

    Im stuck once again.

    I have 4 scenes and each scene 4 buttons(one button for each scene). Im trying to play part of the scene then stop,when you click on a button it finishes the scene and then goes to the scene selected. Is that posible? If so, how can I do this?

  2. #2
    Registered User Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Put a keyframe on the last frame of each scene. Put a stop() there. Put a keyframe in frame 1 of each scene on a labels layer and set a frame label, scn1, scn2, etc.

    Then something like this goes on the last frame of each scene:

    code:
    stop();
    if(_root.where == "one"){
    _root.gotoAndPlay("scn1");
    }
    if(_root.where == "two"){
    _root.gotoAndPlay("scn2");
    }

    if(_root.where == "three"){
    _root.gotoAndPlay("scn3");
    }

    if(_root.where == "four"){
    _root.gotoAndPlay("scn4");
    }



    Now, on the buttons:

    code:
    on(release){
    _root.where = "one";
    _root.play();
    }



    And so on.
    Last edited by iaskwhy; 11-05-2004 at 12:13 AM.

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