2 Replies Latest reply on Sep 12, 2007 8:27 AM by Encom79

    Drawing Text

    Encom79 Level 1

      I would like to make my own widget.
      For graphics in updateDisplayList() I use graphics.drawRectangle, but how to draw Text ?!
        • 1. Drawing Text
          Karl_Sigiscar_1971 Level 3

          Flex components (controls) are also accessible via ActionScript. Alternatively, you can use Flash classes.

          1. You can use the Flex Text or TextArea controls:

          import mx.controls.Text;
          import mx.controls.TextArea;

          var tFlex:Text = new Text();
          tFlex.text = "Write your text here";

          var taFlex:TextArea = new TextArea();
          taFlex.text = "Write your text here";

          2. Or the Flash TextField class:

          import flash.text.TextField;

          var tFlash:TextField = new TextField();
          tFlash.text = "Write your text here";

          • 2. Re: Drawing Text
            Encom79 Level 1

            but how TextField class draw a string. I would like to know the lowest level method to draw a string.
            In java for exemple you can use Graphics.drawString();