Getting errors with TweenColorTransform
Hello.
I need to rewrite a code made in AS2 to AS3. I have the following code:
import mx.transitions.TweenColorTransform;
import mx.transitions.easing.*;
import flash.geom.ColorTransform;
var tween01 = new TweenColorTransform(
myBall1_mc, // movie clip to tween
"", // property to tween
Strong.easeOut, // easing function
myBall1_mc.transform.colorTransform, // start transform
new ColorTransform(2, 1, 10,0,255,255,255,-255), // final transform
1.5, // seconds duration
true); // use seconds for duration (false = use frames)
// color transform yoyo
tween_ct.onMotionFinished = function()
{
tween_ct.yoyo();
}
But when I test this code am getting the following error:
"The class or interface 'mx.transitions.TweenColorTransform' could not be loaded."
Does someone know what I have to do for getting it run properly?
Thank you very much in advance!
I've found the solution...
Thank you very much for your reply. I was still looking for some information about and I found out the TweenColorTransform is an extension of the Color Tween Classes v1.0. Seems it's not available anymore but I was testing that code and realized that replacing the first line:
Code:
import mx.transitions.TweenColorTransform;
By this one:
Code:
import mx.transitions.*;
The error has gone and the code is working fine. Now I can start to write the same code in AS3...
Thank you for the link and thank you very much for your cool reply!