A Flash Developer Resource Site

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Jul 2000
    Location
    London
    Posts
    240
    Hi I need help again


    Right I'll try to explain. I've got a game that when the correct button, (button in a movie clip) is pressed it firstly plays a animation then I want it to load the next scene after 3 seconds upon pressing the button.

    I've got this code which automatically loads the next scene after 3 seconds but I want to attach it to a mc of a button so it only goes to the next scene once it is pressed.


    On the last frame of my main timeline I have:

    Stop
    Set Variable:"stoppedtime"=GetTimer

    then on that same frame I've got a movie clip called scene which consists of two frames

    frame 1

    Set Variable:"stoppedtime"=stoppedtime
    Set Variable:"pausetime" ="3000"
    If(GetTimer >=pausetime+stoppedtime)
    Begin tell target("/")
    Play
    End tell target
    End If

    frame 2

    is blank


    Any help appreciated!!

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Location
    Spain
    Posts
    103
    In the main timelie put a stop action in the frame where the MC with the button appears.
    Then in that Movie Clip, in the last frame put this code:

    Stop
    Set Variable:"stoppedtime"=GetTimer

    In the same frame put the MC called scene.

    Im not sure if this is what you mean.
    Tell me if you have trouble.

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    672

    Lightbulb hi again,

    make the mc:

    frame1:
    stop

    frame2:
    Set Variable:"stoppedtime"=GetTimer

    frame3:
    Set Variable:"stoppedtime"=stoppedtime
    Set Variable:"pausetime" ="3000"
    If(GetTimer >=pausetime+stoppedtime)
    Begin tell target("/")
    Play
    End tell target
    End If

    frame3:
    Go to and play (_currentframe - 1)


    The button action should be:

    OnPress
    Tell target (/mcname)
    Go to and play (2)
    End tell target

    hope this helps

    DRB

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