# Tween Class - Code not executed within onMotionFinished

**URL:** https://forum.kirupa.com/t/tween-class-code-not-executed-within-onmotionfinished/213582
**Category:** flash
**Created:** [January 21, 2007, 7:33am UTC](https://forum.kirupa.com/t/tween-class-code-not-executed-within-onmotionfinished/213582 "2007-01-21T07:33:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Vexir](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@Vexir](https://forum.kirupa.com/u/Vexir)
#### Post date: [January 21, 2007, 7:33am UTC](https://forum.kirupa.com/t/tween-class-code-not-executed-within-onmotionfinished/213582/1 "2007-01-21T07:33:06Z")

</div>

How come the code within the onMotionFinished function never executes?

```auto

import mx.transitions.Tween;
import mx.transitions.easing.*;

var topboxsectionXScale:Tween = new Tween(topboxsection_mc, "_xscale", Elastic.easeOut, 0, 100, .7, true);
var middleboxsectionXScale:Tween = new Tween(middleboxsection_mc, "_xscale", Elastic.easeOut, 0, 100, .7, true);
var bottomboxsectionXScale:Tween = new Tween(bottomboxsection_mc, "_xscale", Elastic.easeOut, 0, 100, .7, true);

bottomboxsectionXScale.onMotionFinished = function() {
	var middleboxsectionYscale:Tween = new Tween(middleboxsectiontop_mc, "_height", none, 14, 493, .7, true);
	bottomboxsection_mc._y += 479;
}

```

Edit:// Nevermind. 😛
