3 Replies Latest reply on Dec 12, 2007 11:09 PM by Pratap Reddy

    Problem draw line

    y.muny Level 1
      I have one problem with this code for draw line

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" mouseMove="fn_init()">
      private function fn_init():void{
      var g:Graphics = graphics;
      g.lineStyle(1, 0x999999);
      g.moveTo(this.mouseX, this.mouseY);

      Above this code it display error when i complie it
      "1067: Implicit coercion of a value of type flash.display:Graphics to an unrelated type flash.display:DisplayObject."

      Please help me to solve this problem.