0 Replies Latest reply on Nov 9, 2007 6:44 AM by gh_sg

    error message: Call to a possibly undefined method

      i was reading the book on Flex 2 published by Wrox.

      This is the code (chapter 7):


      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">


      import mx.managers.CursorManager;
      import flash.events.*;

      private var cursorID:Number = 0;

      private var busyCursorSymbol:Class;

      private function initImage(event:MouseEvent):void
      cursorID = CursorManager.setCursor(busyCursorSymbol);

      private function loadComplete(event:Event):void


      <mx:Image id="myImage" complete="loadComplete(event)"/>
      <mx:Button id="myButton" label="Show" click="initImage(event)"/>


      The problem is, whenever i run it, i will always get the compiler error message:
      1061: Call to a possibly undefined method removeCursor through a reference with static type Class.

      I couldn't figure out why this is the case - i mean i have already import the CursorManager class, so why am i getting this error message?