# Tween + Actioscript

**URL:** <https://forum.kirupa.com/t/tween-actioscript/21296>\
**Category:** flash\
**Created:** [May 20, 2003, 2:11am UTC](https://forum.kirupa.com/t/tween-actioscript/21296 "2003-05-20T02:11:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adham\_a](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@adham\_a](https://forum.kirupa.com/u/adham_a)\
**Post date:** [May 20, 2003, 2:11am UTC](https://forum.kirupa.com/t/tween-actioscript/21296/1 "2003-05-20T02:11:25Z")

</div>

Hello all,

I have a question that been really long in my mind. If i have the following setting.

the main timeline of my movie is divided into 2 keyframes on labled ‘key1’ and the other ‘key2’. In each of this keyframes i used the function stop(); to stop the movie from running once loaded.

Now i have a button with the following actionscript lines:

[AS]

on (release) {  
this.gotoAndStop(“key1”);  
}

[/AS]

at the first run when this button is clicked the desired motion will occur but when the button is pressed again, the movie timeline will be on ‘key2’ and then it will go to ‘key1’ to play but their is the stop(); command so the user will have to click the button another time to play the movie.

Anybody can tellhow i can overcome this problem.

Thanks  
:rd:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 20, 2003, 3:58am UTC](https://forum.kirupa.com/t/tween-actioscript/21296/2 "2003-05-20T03:58:58Z")

</div>

try posting you fla so we can better help you out
