A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: reload swf using button

  1. #1
    Member
    Join Date
    Apr 2008
    Posts
    71

    reload swf using button

    I have created a lunar lander game and if you lose all your lives i want the user to be able to try again. i was trying to remove all the children and add them again but thats turning out to be a nightmare. I can't use gotoAndPlay(1); either because i only have one frame. Does anyone know if there is an fscommand or something that you can attach to a button that just reloads the swf?

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    When the game is finished you use
    setTimeout(startAgain,1000);
    function startAgain():void
    {
    //load your movie again in the Loader object
    }
    The movie will be loaded 1 sec later.
    - The right of the People to create Flash movies shall not be infringed. -

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