0 Replies Latest reply on Sep 17, 2006 6:35 AM by Newsgroup_User

    flex call simple function

    Level 7
      Hi, I'm trying to use Flex Builder.
      How can I call this function? I can't get it working. Thanks.

      <mx:Script>
      <![CDATA[
      import flash.display.*;
      public function drawer():void{
      var mySprite:Sprite = new Sprite();
      mySprite.graphics.beginFill(0xffcc00);
      mySprite.graphics.drawCircle(30,30,30);
      var lab:TextField = new TextField();
      lab.text = "hello";
      lab.x = 300;
      lab.y = 300;
      mySprite.addChild(lab);
      addChild(mySprite);
      }
      ]]>
      </mx:Script>