3 Replies Latest reply on Feb 2, 2011 10:09 AM by Flex harUI

    errors - drawing a text curve in flex with flex 3 with flex 3.5 framework

    Atishay Jain

      Is that necessary in drawing a text curve in flex we need flex 4 with flash player 10, actually i have flex 3 with flex 3.5 framework but it is showing error like this :

       

      This is my code:

       

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:Script>
      <![CDATA[

      import mx.components.TextView;
             
      public var myText:String = "Read my blog @ http://www.funnyjokesfunny.com";
      var radius:Number = 125;
      var spacing:Number = 8;    
      var center:Point = new Point(125,125);
             
      public function drawText():void {
      for (var char:uint=0;char<myText.length;char++) {
      var tempText:TextView = new TextView();
      tempText.x = radius * Math.cos(degrees2radians(char*spacing)) + center.x;
      tempText.y = radius * Math.sin(degrees2radians(char*spacing)) + center.y;
      tempText.rotation = 25;
      tempText.text = myText.charAt(char);
      textContainer.addChild(tempText);
      }
      }
             
      ]]>
      </mx:Script>

      <mx:Button label="Draw a circle" click="drawText()" />
      <mx:Canvas id="textContainer"  y="50" x="50"  width="400" height="400" />       

      </mx:Application>

       

       

       

      1) call to possibly  undefined method Text View

      2) Type was not found : Text view.                               

       

      Please help me

      Atishay