7 Replies Latest reply on Oct 5, 2010 7:30 AM by RandomReado

    Flex 4.1/4.5: setBusyCursor() causes cursor to completely disappear

    RandomReado Level 1

      Could someone please try running the code below and tell me if you get the same result? Basically when you click Create Window, a new Window() instance is created. Within that window clicking the "SetBusyCursor" button should result in the Busy Cursor being displayed, but for me it's causing the cursor to completely disappear.

       

      Trying to determine if it's something I'm doing wrong or an SDK bug. Thanks in advance.

       

      // Main.mxml (windowed application)

      <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"

                             xmlns:s="library://ns.adobe.com/flex/spark"

                             xmlns:mx="library://ns.adobe.com/flex/mx">
          <fx:Script>         <![CDATA[             import com.MyWindow;

       

                  private function createWindow():void             {                 this.close();                                 var mw:MyWindow = new MyWindow();                 mw.open();             }

              ]]>     </fx:Script>

          <s:Button label="Create Window" click="createWindow()"/> </s:WindowedApplication>

       

      // MyWindow.mxml (component)

      <?xml version="1.0" encoding="utf-8"?>
      <s:Window xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:s="library://ns.adobe.com/flex/spark"
                xmlns:mx="library://ns.adobe.com/flex/mx"
                width="400" height="300">
          <fx:Script>
              <![CDATA[
                  import mx.managers.CursorManager;
                 
                  private function setBusyCursor():void
                  {
                      CursorManager.setBusyCursor();
                  }
              ]]>
          </fx:Script>
          <s:Button label="SetBusyCursor" click="setBusyCursor()"/>
      </s:Window>