gotoAndStop.parent("home") AS3 ?

hi everyone thanks for looking at this I need some help it should be simple I hope.

I am inside a movie clip on the main timeline in a AS3 project and I run my animation on the click of a button, once the animation is done I need code on the last frame that says go to frame label “home” that is in the parent timeline of the movie clip I am in or the root.

in AS2 I simply used the code below on the last frame of the animation

_parent.gotoAndStop(“home”);

hi everyone thanks for looking at this I need some help it should be simple I hope.

I am inside a movie clip on the main timeline in a AS3 project and I run my animation on the click of a button, once the animation is done I need code on the last frame that says go to frame label “home” that is in the parent timeline of the movie clip I am in or the root.

in AS2 I simply used the code below on the last frame of the animation

_parent.gotoAndStop(“home”);


(parent as MovieClip).gotoAndStop(“home”)

WOW that worked perfect Thanks so Much MB.

I just bought your CMS File editor/upload tool because it is great and for all the support and info you have always given for me. :slight_smile:

Thanks :slight_smile:

Hey Uncharted,

Although that code works great, I find that sometimes using the following method can also help with climbing the ladder:

var grandaddy:MovieClip = MovieClip(this.parent.parent); grandaddy.gotoAndStop("home");

woah super cool that will come in handy for sure Jack thanks so much. I owe you one. :slight_smile:

all code copied and pasted for secure storage and another day

Thanks :)

No, Thank you. It was my pleasure. :slight_smile:

I usually use:

MovieClip(parent).something…

basically the same as what the others have said, but just another alternative.

thanks everyone for the great help I have collected and documented all code for my library. yall ROCK