A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: a button for going to another scene

  1. #1
    Junior Member
    Join Date
    Feb 2001
    Posts
    6

    a button for going to another scene

    i added a button to the first scene with action:
    on(release){
    gotoAndPlay("Scene 2", 1);
    }

    but it doesn't work! anyone can help?

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Go to scene 2. In frame 1, add this frame label name, scn2fr1. Use a separate layer if you want to keep it neat. Now, on the button;

    on(release){
    _root.gotoAndPlay("scn2fr1");
    }

    That's some kind of record, 4 1/2 years registered and only 3 posts.

  3. #3
    Junior Member
    Join Date
    Feb 2001
    Posts
    6

    thank you!!!

    you are a genius. why did the old way didn't work?


  4. #4
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    It seldom does, or ever did. The only reason I can think of is because a scene is not really an object with a true instance name, so it doesn't target right.

  5. #5
    Junior Member
    Join Date
    Feb 2001
    Posts
    6

    anyway

    thanks a lot.
    BTW, i posted at least 7 times.

  6. #6
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Well, the Coffee Lounge doesn't count.

  7. #7
    Member
    Join Date
    Mar 2005
    Location
    Guadalajara, Jalisco, México
    Posts
    30
    HAHA

    i wrote a _root function for that purpose, it recibes the name of the scene to go and use the gotoAndPlay() function, it works beacause its a _root function and it isnt inside a button
    ---Seth Illgard---

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