# When tween AS is finished or at location do this

**URL:** <https://forum.kirupa.com/t/when-tween-as-is-finished-or-at-location-do-this/226286>\
**Category:** Uncategorized\
**Created:** [May 19, 2007, 6:33pm UTC](https://forum.kirupa.com/t/when-tween-as-is-finished-or-at-location-do-this/226286 "2007-05-19T18:33:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duck](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@Duck](https://forum.kirupa.com/u/Duck)\
**Post date:** [May 19, 2007, 6:33pm UTC](https://forum.kirupa.com/t/when-tween-as-is-finished-or-at-location-do-this/226286/1 "2007-05-19T18:33:39Z")

</div>

Hi,

First off im a real newbie with AS,  
Recently i started tweening using Robert Penners AS Classes.  
Wich are quite cool btw.

However i now want that when the animation reaches  
a certain \_x / \_y value or at the end of the animation that it executes a removeMovieClip() and attaches a new one.

Code:

```auto
maincontainer.splash.start_btn.onPress = function() {
    new mx.transitions.Tween(maincontainer.splash.start_btn, "_y", mx.transitions.easing.Bounce.easeOut, 455, -600, 50);
    new mx.transitions.Tween(maincontainer.splash.mainbg_mc, "_y", mx.transitions.easing.Bounce.easeOut, 432, -600, 50);
    new mx.transitions.Tween(maincontainer.splash.menubar_mc, "_y", mx.transitions.easing.Bounce.easeOut, 432, -600, 25);
    }

```

To clarify when menubar\_mc reaches y\_ -600 it should execute the removeMovieClip();
