A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Gotoandplay doesnt work - what did i do wrong?! Please Help

  1. #1
    FLASH LOVER
    Join Date
    Apr 2007
    Location
    ST.LOUIS MO, USA
    Posts
    21

    Gotoandplay doesnt work - what did i do wrong?! Please Help

    Im tried to create a button and give the action script so that it starts playing the animation from frame 1 again - does not work !!! Not sure why?!

    Please Help - should be some very basic stuff that i missed.

    Thanks.
    Attached Files Attached Files

  2. #2
    Getting There! bitsk308's Avatar
    Join Date
    Jul 2000
    Location
    Phoenix, AZ
    Posts
    427
    Your gotoAndPlay doesn't work because you aren't telling flash what object you want the gotoAndPlay to work on. Since you don't specify it tries to do it on whatever object is making the call, in your case the button, so nothing seems to happen. First give the morphing block and instance name like myBox in the properties box (this is how flash references all objects on the stage). Then on the button, use that name to target the goto action to the clip

    on(release){
    myBox.gotoAndPlay(1);
    }

    best

    _b

  3. #3
    FLASH LOVER
    Join Date
    Apr 2007
    Location
    ST.LOUIS MO, USA
    Posts
    21
    Thanks. Just one thing - when i click on replay, animation plays but the replay button stays there. I want to have the animation run as how it ran the first time (replay button appearing at the very end) - is this possible?

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