Adding button in Actionscript code : Using Flex Builder

Posted by dta on Stack Overflow See other posts from Stack Overflow or by dta
Published on 2009-06-20T18:42:20Z Indexed on 2010/03/12 17:47 UTC
Read the original article Hit count: 341

Filed under:
|
|

I created a new actionscript project using Flex Builder 3 and tried

to run the following file. I get this error :

Definitions: fl.controls:Button could not be found. All I want to do is, to add a button to the application. How could I do it?

package  {
        import PaperBase;
        import org.papervision3d.objects.primitives.Cone;
        import fl.controls.Button;
        import fl.controls.Label;
        import fl.events.ComponentEvent;

        public class cone1 extends PaperBase {
        	public var cone:Cone = new Cone();
        	protected var sceneWidth:Number;
        	protected var sceneHeight:Number;
        	public function cone1() {
        		sceneWidth = stage.stageWidth
        		sceneHeight = stage.stageHeight;
        		init(sceneWidth*0.5,sceneHeight*0.5);//position of the cone
        	}
        	override protected function init3d():void {
        		cone.scale = 5;
        		cone.pitch(-40)
        		default_scene.addChild(cone);
        	}
        	override protected function processFrame():void {
        		cone.yaw(1);//rotation speed
        	}
        }
    }

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript