# onClipEvent problem

**URL:** https://forum.kirupa.com/t/onclipevent-problem/121099
**Category:** Uncategorized
**Created:** [August 30, 2004, 10:09pm UTC](https://forum.kirupa.com/t/onclipevent-problem/121099 "2004-08-30T22:09:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mprzybylski](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mprzybylski/32/613_2.png) [@mprzybylski](https://forum.kirupa.com/u/mprzybylski)
#### Post date: [August 30, 2004, 10:09pm UTC](https://forum.kirupa.com/t/onclipevent-problem/121099/1 "2004-08-30T22:09:06Z")

</div>

Hello,  
I have a button with an instance name of “sub1” and inside of this button frame one has a stop action and frame 2-10 is a tween of it moving up with a stop action on frame 10. on this button i have a script that says the following:

```auto
onClipEvent (load) {
 	this.gotoAndPlay(2);
 }

```

so this button is supposed to go and play out the animation from frame 2 to 10 when i test the movie, however it plays frame 2 and stops there so it just moved up a little bit.

what i am trying to achieve is i want this button to be on frame 10 when the entire movie loads because its button 1 of my 3 buttons that move up and down and the first one shows an image which automatically loads when the page is open so i want that buttons “up” state to be at frame 10 when the movie loads as well. is my code incorrect or should i be doing something different all together?
