# Stop a tween class in another function

**URL:** https://forum.kirupa.com/t/stop-a-tween-class-in-another-function/208759
**Category:** Uncategorized
**Created:** [December 2, 2006, 1:40am UTC](https://forum.kirupa.com/t/stop-a-tween-class-in-another-function/208759 "2006-12-02T01:40:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)
#### Post date: [December 2, 2006, 1:40am UTC](https://forum.kirupa.com/t/stop-a-tween-class-in-another-function/208759/1 "2006-12-02T01:40:44Z")

</div>

hi all, i jjust want to know a way how to (on the rollout) stop the tweens that are happening on the rollover

```auto

for (i=0; i<=sections.length; i++) {
    this[sections*+""].onRollOver = function() {
        var heightGo:Tween = new Tween(this, "_height", Strong.easeOut, this._height, 2*this._height, 0.3, true);
        var widthGo:Tween = new Tween(this, "_width", Strong.easeOut, this._width, 2*this._width, 0.3, true);
    };
    this[sections*+""].onRollOut = function() {
        var heightGoBack:Tween = new Tween(this, "_height", Strong.easeOut, this._height, 0.5*this._height, 0.3, true);
        var widthGoBack:Tween = new Tween(this, "_width", Strong.easeOut, this._width, 0.5*this._width, 0.3, true);
    };
}

```

I don’t know how to reference a tween within that function :S
