# Cancel code-based Tween

**URL:** <https://forum.kirupa.com/t/cancel-code-based-tween/239310>\
**Category:** flash\
**Created:** [September 20, 2007, 12:24pm UTC](https://forum.kirupa.com/t/cancel-code-based-tween/239310 "2007-09-20T12:24:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drummondlw](https://avatars.discourse-cdn.com/v4/letter/d/7ba0ec/32.png) [@drummondlw](https://forum.kirupa.com/u/drummondlw)\
**Post date:** [September 20, 2007, 12:24pm UTC](https://forum.kirupa.com/t/cancel-code-based-tween/239310/1 "2007-09-20T12:24:38Z")

</div>

Hi,

I am having some problems with Tween behaviour. I have two ‘pages’ which are DisplayObjects with children. On the first I have an object that has a default position and it can also be tweened to a ‘yes’ or ‘no’ position. There is also a skip button which when pressed resets the position of the object to its default position.

If the object has finished tweening fully and I press the skip button to go to the next page and come back, the object is in its default position as it should be, but if I skip while the tween isn’t completely finished and then come back, it will still be in the ‘yes’ or ‘no’ position.

I have tried using tween.fforward() which seems to speed it to the end of the tween, but the same problem occurs, I am wondering if the tween still runs for the same amount of time but appears as the last frame would?

Is there a way to cancel a tween?

thanks for your time
