Skip to main content
Known Participant
June 20, 2007
Question

getChildAt(x).gotoAndStop(1);

  • June 20, 2007
  • 2 replies
  • 452 views
I want to do something like this...this works up to the container.getChildAt(2).gotoAndStop(3) call. the container is populated with the animations (each with 10 frames) and they are all stopped on frame 1 as told to in the for loop, but when I try to access gotoAndStop in side the container I get an error. 1061:
This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
June 20, 2007
you're welcome.
Known Participant
June 20, 2007
oh..the error is 1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:DisplayObject.
kglad
Community Expert
Community Expert
June 20, 2007
assuming Animation() extends MovieClip, cast container.getChildAt(2) as a movieclip:

Known Participant
June 20, 2007
umm, I would have never figured that out. Thanks!