# Why can't a tween be repeated again?

**URL:** <https://forum.kirupa.com/t/why-cant-a-tween-be-repeated-again/309779>\
**Category:** flash\
**Created:** [May 24, 2010, 9:37pm UTC](https://forum.kirupa.com/t/why-cant-a-tween-be-repeated-again/309779 "2010-05-24T21:37:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![patov2](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@patov2](https://forum.kirupa.com/u/patov2)\
**Post date:** [May 24, 2010, 9:37pm UTC](https://forum.kirupa.com/t/why-cant-a-tween-be-repeated-again/309779/1 "2010-05-24T21:37:58Z")

</div>

I’ve created a movie clip. This movie clip contains a strip of images put together. I use actionscript 3.0 to tween it into position every time a arrow button is pressed. The green space is a mask so it can’t be seen until it enters that space. I am only focusing on the right arrow button at the moment.

Heres an image of what I mean.  
 ![](http://forum.kirupa.com/uploads/kirupa/6234/471142c67ebc3866.png)

I’ve made each tween 15 frames long and when it gets to it I have a stop();  
on the 15th, 30th, 45th, 60th and 75th frame as there are 5 images in the movie clip you can see above.

This code is on every 15 frames

stop();

Right\_btn.addEventListener(MouseEvent.MOUSE\_DOWN, mouseDownHandler1);  
function mouseDownHandler1(event:MouseEvent):void {  
gotoAndPlay(16);  
}

On the next frame after every 15 frames so the 1st, 16th, 46th etc. This code is on the frame to tween it into place.

import fl.transitions.Tween;  
import fl.transitions.easing.\*;  
var myTween1:Tween = new Tween(Pictures1, “y”, Strong.easeInOut, 18, 173, 20, false);

This all works and everything is fluid until the end of all the frames which is frame 75, on the last I make it have this script.

stop();

Right\_btn.addEventListener(MouseEvent.MOUSE\_DOWN, mouseDownHandler1);  
function mouseDownHandler1(event:MouseEvent):void {  
gotoAndPlay(1);  
}

This is so when the right button is clicked it goes back to the beginning and it all starts again. The problem I have is it won’t work anymore, it keeps playing the same tween over and over when I click the right arrow. Anybody know whats wrong?

PS. I’m new to actionscript, thanks again.
