A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Restart SWF

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    15

    Restart SWF

    Hi everybody !

    how can i restart my swf when i press one botton ?

    Code:
    function clearBtn(e:Event):void
    {	
             // Restart swf
    }
    Thanks !

  2. #2
    Member
    Join Date
    Oct 2010
    Posts
    55
    have you tried goToAndPlay(1)?
    (Assuming, of course, your SWF starts at frame 1).

  3. #3
    Junior Member
    Join Date
    Jan 2011
    Posts
    15
    Quote Originally Posted by Guilhermedidi View Post
    have you tried goToAndPlay(1)?
    (Assuming, of course, your SWF starts at frame 1).
    How does the method goThoAndPlay use?
    Sorry but I'm not very practice in ActionScript !

    I traied so :

    Code:
    function clearBtn(e:Event):void
    {	
    	goToAndPlay(1);
    }
    but ... i have a error of compilation "code 1180"
    Thanks !

  4. #4
    Junior Member
    Join Date
    Jan 2011
    Posts
    15
    emh ... my SWF is code-based

  5. #5
    Member
    Join Date
    Oct 2010
    Posts
    55
    sorry acer, I misspelled it. try gotoAndPlay(1).
    (the T in 'to' is not capital)
    Last edited by Guilhermedidi; 03-01-2011 at 10:46 AM.

  6. #6
    Junior Member
    Join Date
    Jan 2011
    Posts
    15
    There aren't any errors of compilation but it doesn't work!
    Is there a method to refresh the html page which contains my swf ?

    P.S.
    How i can see the frame's number of my Clip ?

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