Actionscript error cannot import library
In the Below action script file i get an error saying cannot import mx.controls.Label,how is this to be resolved
package {
import flash.display.Sprite;
import mx.controls.Label;
public class cl开发者_如何学Cd extends Sprite
{
public function cld()
{
var myLabel:Label = new Label();
myLabel.text = "hello";
addChild(myLabel);
}
}
}
Make sure it is Flex project and that in project properties->Flex Build Path->Library Path you import the framework.
精彩评论