# \[FMX\] AS color motion tween

**URL:** <https://forum.kirupa.com/t/fmx-as-color-motion-tween/131336>\
**Category:** Uncategorized\
**Created:** [December 14, 2004, 6:48pm UTC](https://forum.kirupa.com/t/fmx-as-color-motion-tween/131336 "2004-12-14T18:48:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakke](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jakke](https://forum.kirupa.com/u/jakke)\
**Post date:** [December 14, 2004, 6:48pm UTC](https://forum.kirupa.com/t/fmx-as-color-motion-tween/131336/1 "2004-12-14T18:48:17Z")

</div>

I want to make an AS based motion tween with colors. What’s the easiest way to do that? I Have already this code:

[AS]MovieClip.prototype.nL = function(nY, sN) {  
this.onEnterFrame = function() {

```
	// nY
	this.dY = nY - this._y;
	this.mY = this.dY/sN;
	this._y += this.mY;

```

}  
}[/AS]

Something like this would be perfect:  
[AS]MovieClip.prototype.nL = function(nY, nC, sN) {  
this.onEnterFrame = function() {

```
	// nY
	this.dY = nY - this._y;
	this.mY = this.dY/sN;
	this._y += this.mY;

       // nC
       // and here the code

```

}  
}

blahblah.onRollOver = function() {  
this.nL(20,0xFFCC00,5);  
}[/AS]
