1 Reply Latest reply on Mar 28, 2007 2:15 PM by lli123

    How to avoid show original mouse image?

    lli123 Level 1
      My problem is, athought the new mouse image for Cursor is show up, but the original mouse Cursor image still show up. So there are two images are displayed the same time. Here is the code from the Flex document:

      <?xml version="1.0" encoding="utf-8"?>
      xmlns:mx=" http://www.adobe.com/2006/mxml"

      width="400" height="160"

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

      // Embed the SWF that will be used as
      // the custom cursor.

      public var HourGlassAnimation:Class;

      private const ON_MESSAGE:String = "Custom Cursor ON";
      private const OFF_MESSAGE:String = "Custom Cursor OFF";

      private function busyCursorButtonHandler(event:MouseEvent):void

      var toggleButton:Button = event.target as Button;
      if (toggleButton.selected)

      // The setCursor() method returns a numeric ID for
      // the cursor being set. You can store and use this
      // ID later in a removeCursor() call, or, you can
      // use the static currentCursorID property of the
      // CursorManager class to achieve the same result.

      toggleButton.label = ON_MESSAGE;

      toggleButton.label = OFF_MESSAGE;


      paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
      horizontalAlign="center" verticalAlign="middle"

      title="Custom cursor"

      <!-- Toggle button turns the custom cursor on and off. -->
      label="{OFF_MESSAGE}" toggle="true"


      <mx:Text text="Click the button to display or hide the custom cursor."/>

      Anybody has a idea how to control only show one mouse image for the mouse cursor at the time?