# Next button only works once

**URL:** https://forum.kirupa.com/t/next-button-only-works-once/275057
**Category:** flash
**Created:** [November 8, 2008, 2:28pm UTC](https://forum.kirupa.com/t/next-button-only-works-once/275057 "2008-11-08T14:28:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![IanCremona](https://avatars.discourse-cdn.com/v4/letter/i/65b543/32.png) [@IanCremona](https://forum.kirupa.com/u/IanCremona)
#### Post date: [November 8, 2008, 2:28pm UTC](https://forum.kirupa.com/t/next-button-only-works-once/275057/1 "2008-11-08T14:28:52Z")

</div>

When clicked, the tween works well. but when clicked again nothing happens. why?

```
if(event.target == btnNext)
{
    promoNum = promoNum+1;
    if(promoNum &gt;= 19) //must change number 19 with XML var
       {
          promoNum = 0;
       }
    trace(promoNum);
    moveEnd = -(((this.getChildByName("promotion"+(promoNum))).width)-100);        
    
    for(var i:Number = 0; i &lt; 19; i++)
    {
    xTween = new Tween(this.getChildByName("promotion"+i),"x",None.easeNone,(this.getChildByName("promotion"+i)).x,moveEnd,1,true);
    trace(moveEnd);
    
    }
}
```
