A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: gotoAndPlay from frame

  1. #1
    Member
    Join Date
    Aug 2001
    Posts
    31

    gotoAndPlay from frame

    Isn't it possible to use the gotoAndPlay function from frameaction?

    I've got a movieclip on the stage with a stop action i frame 1 and an animation from frame 2-10. When I write:

    test_mc.gotoAndPlay(2)

    in the frame action nothing happens. If I put the action on a button it works fine, but I need to call it from the frame.

  2. #2
    Senior Member
    Join Date
    Apr 2006
    Posts
    1,059
    if its in a frame of the movieclip it should just be
    gotoAndPlay(2)

    since its being called while in test_mc flash is reading it like you had
    test_mc.test_mc.gotoAndPlay(2)
    since flash basically interperets your code as
    this.test_mc.gotoAndPlay(2), and this = _root.test_mc

  3. #3
    Member
    Join Date
    Aug 2001
    Posts
    31
    But the actionscript is on a frame in the root. It's not in the test_mc movieclip. I have tried _root.test_mc.gotoAndPlay(2) but it doesn't work.

  4. #4
    Member
    Join Date
    Aug 2001
    Posts
    31
    It actually goes to the frame but it stops at the frame it doesn't play.

  5. #5
    An Englishman in Frankfurt Jimbrowski's Avatar
    Join Date
    Nov 2006
    Posts
    240
    May sound obvious, but is test_mc the name of the MovieClip ?? or is it the MovieClips instance name ??

    Jimmy

  6. #6
    Member
    Join Date
    Aug 2001
    Posts
    31
    it's the instance name. As I wrote it works if I but the action on a button but not when I but in the frame. It goes to frame 2 but it doesn't play.

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