# Problem with repeating animation

**URL:** https://forum.kirupa.com/t/problem-with-repeating-animation/298847
**Category:** Uncategorized
**Created:** [October 26, 2009, 11:59am UTC](https://forum.kirupa.com/t/problem-with-repeating-animation/298847 "2009-10-26T11:59:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![paddles](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@paddles](https://forum.kirupa.com/u/paddles)
#### Post date: [October 26, 2009, 11:59am UTC](https://forum.kirupa.com/t/problem-with-repeating-animation/298847/1 "2009-10-26T11:59:20Z")

</div>

Hello,

I am trying to make an animated flash banner in which a graphic slides across a 774 by 100 px stage which stops after playing once and repeats on mouse over.

I have managed to make the animation repeat on mouse over, but when it does, the graphic only slides to the point on the stage that the mouse moved over.

I have also tried this with a mouse out which works fine but is not quite what I was trying to achieve.

any help would be much appreciated. The code I have used so far is:

ban.mouseChildren = false;  
ban.addEventListener(MouseEvent.MOUSE\_OUT, banOut);  
ban.addEventListener(MouseEvent.MOUSE\_OVER, banOver);

function banOut(event:MouseEvent):void  
{  
ban.gotoAndPlay(“banner”)  
}

function banOver(event:MouseEvent):void  
{  
ban.gotoAndPlay(“banner”)  
}

Thanks in advance
