A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Jumping from Scene to Scene with Buttons?

  1. #1
    Junior Member
    Join Date
    Aug 2000
    Posts
    19
    Hi. Is there a simple way to jump to a new scene after pressing a button that is within a movie clip? I have been trying to do it with variables without any luck to this point.

    The movie is called sidemenu and the button wihin the movie clip is called roster.

    I have the property for roster as follows:

    On (Press)
    Set Variable: "buttonpressed" = 1
    End On

    And back on the opening scene, I have the property set up as follows:

    If (sidemenu/roster:buttonpressed=1)
    Go to and Play (roster, 1)
    End If



    So far, this has not worked. Any suggestions?

  2. #2
    Junior Member
    Join Date
    Aug 2000
    Posts
    19

    Lightbulb One workaround

    I ended up modifying the code as follows to get it to work. In the roster button, I used the tell target command and told it to go to frame 2 of _level0 if the button was pressed. In frame two of _level0 I simply told it to go to the roster scene.

    This works, but seems more work than the other way. Anyone know what is wrong with my code above?

    Thanks!

  3. #3
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    The best way is to label the first frame of each scene then on your button from inside the movieclip put:

    on(press)
    Begin tell target("/")
    Go To And Play("labelname")
    End tell target
    end on


    That will work just fine.

    / refers to the main timeline when using the tell target command.

    Hope that helps!
    Regadrs FLashGuru

  4. #4
    Junior Member
    Join Date
    Aug 2000
    Posts
    19

    Smile Thanks!!

    Round of applause for the guru! I just tried it and it worked beautifully. :-)

    Maybe Mondays aren't so bad afterall.

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