# Tween Class not working

**URL:** https://forum.kirupa.com/t/tween-class-not-working/169632
**Category:** flash
**Created:** [November 17, 2005, 9:59pm UTC](https://forum.kirupa.com/t/tween-class-not-working/169632 "2005-11-17T21:59:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![CayoHueso](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@CayoHueso](https://forum.kirupa.com/u/CayoHueso)
#### Post date: [November 17, 2005, 9:59pm UTC](https://forum.kirupa.com/t/tween-class-not-working/169632/1 "2005-11-17T21:59:59Z")

</div>

Hi everybody,

I am learning to work with the tween class, using the tutorial here at [Kirupa.com](http://Kirupa.com).

I am using Flash MX 2004 Profesional. The code is:

```auto

import mx.transitions.Tween;
import mx.transitions.easing.*;
var xScaleT:Tween = new Tween(kText, "_rotation", Elastic.easeOut, 0, 360, 3, true);
var xPosT:Tween = new Tween(kText, "_x", Bounce.easeOut, 0, Stage.width, 3, true);

xScaleT.onMotionFinished = function() {
	this.yoyo();
};
xPosT.onMotionFinished = function() {
	this.continueTo(Stage.width / 2, 3);
};

```

The first part of the code works great, but the onMotionFinished event does not work, and I get the following output message:

**Error** Scene=Scene 1, layer=actions, frame=1:Line 6: There is no property with the name ‘onMotionFinished’.  
xScaleT.onMotionFinished = function() {

**Error** Scene=Scene 1, layer=actions, frame=1:Line 9: There is no property with the name ‘onMotionFinished’.  
xPosT.onMotionFinished = function() {

Can anyone help me?  
Thanks a lot
