A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Help with Buttons that play different Scenes THEN return back to the Button page.

  1. #1
    Junior Member
    Join Date
    Aug 2015
    Posts
    5

    Unhappy Help with Buttons that play different Scenes THEN return back to the Button page.

    Hello, I'm trying to figure out how to make a Main page with buttons, hitting each button plays a different scene, when the scene ends I WOULD LIKE IT TO return to the button page.

    So far I've been fooling around with Code Snippets and a tiny bit of code.

    I have a button page (scene 1), button one goes to scene 2 but then plays scene 3 before returning to the button page.

    button two plays the scene 3 and returns to the button page. I'm trying to figure out a way to make each scene end then and return to the button page rather than continuing to play every scene in order.

    here is my fla file if you wish to look at it yourself.
    thanks
    http://s000.tinyupload.com/index.php...94503169699534
    http://www.filedropper.com/cubetest

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    Without having looked at your files try using stop(); at the end of each scene and then maybe the return to button scene code.
    gotoAndStop("buttonScene", 1);

  3. #3
    Junior Member
    Join Date
    Aug 2015
    Posts
    5
    Quote Originally Posted by fruitbeard View Post
    Hi,

    Without having looked at your files try using stop(); at the end of each scene and then maybe the return to button scene code.
    gotoAndStop("buttonScene", 1);
    Thanks, that more or less worked.

  4. #4
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    Glad I helped, I notice this is in the AS3 section, i put the code for AS2 instead.
    so AS3:
    stop();
    gotoAndStop(1,"ButtonSceneName");

  5. #5
    Junior Member
    Join Date
    Aug 2015
    Posts
    5
    Quote Originally Posted by fruitbeard View Post
    Hi,

    Glad I helped, I notice this is in the AS3 section, i put the code for AS2 instead.
    so AS3:
    stop();
    gotoAndStop(1,"ButtonSceneName");
    right, thats the code i ended up using, thanks :]

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