PDA

View Full Version : Where is Tween Class?


midur
12-22-2006, 02:40 PM
In Flex Builder 2 when I wont to import Tween class with:

import mx.effects.Tween;

flex show me a error: 1172: Definition mx.effects:Tween could not be found.

Can anyone Help me...

madgett
12-22-2006, 04:52 PM
Are you using the SDK or Flex Builder to build your app?

You might have to reinstall something or set classpaths pointing to the AS3 framework.

This will compile for me with no issues:package asorg
{
import mx.effects.Tween;
public class Test
{
public function Test():void
{
var lis:Object = new Object();
var t:Tween = new Tween(lis, 0, 10);
}
}
}

dr_zeus
12-22-2006, 05:47 PM
I'm guessing that you're using an Actionscript project rather than a Flex project. By default, Actionscript projects don't include any of the mx.* classes. You'll need to go into the project options and add the required SWC file (framework.swc, I think).

midur
12-22-2006, 10:08 PM
Good guessing!
TNX!