# Help with CS3 gotoAndPlay()

**URL:** <https://forum.kirupa.com/t/help-with-cs3-gotoandplay/284622>\
**Category:** flash\
**Created:** [March 21, 2009, 12:45am UTC](https://forum.kirupa.com/t/help-with-cs3-gotoandplay/284622 "2009-03-21T00:45:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![batouttahell](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@batouttahell](https://forum.kirupa.com/u/batouttahell)\
**Post date:** [March 21, 2009, 12:45am UTC](https://forum.kirupa.com/t/help-with-cs3-gotoandplay/284622/1 "2009-03-21T00:45:02Z")

</div>

I’m a total flash and actionscript newbie. I’m having some problems coding some actionscript for an animation created by a friend. He’s created the entire animation and has asked me to insert some code that will execute certain parts of the animation only if a click or mouse over event occurs.

What I want to do is this. Go to a certain frame number and then execute a gotoAndPlay(frame number) function on it. Once the animation has run for a certain number of frames I want it to stop. How do I get it to do this? And the animation is not on the root timeline so I can’t even use root.currentFrame() to find out.

Please help me, this is very urgent.
