topical media & game development

talk show tell print

professional-flex-code-07-CursorManager.mx

professional-flex-code-07-CursorManager.mx [swf] flex


  <?xml version="1.0" encoding="utf-8"?>
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  
          <mx:Script>
                  <![CDATA[
                          
                          import mx.managers.CursorManager;
                          
                          [Embed(source="professional-flex-code-07-busy.png")]
                          private var busyCursorSymbol:Class;
                          
                          private var cursorId:Number = 0;
                          
                          private function initImage():void
                          {
                                  myImage.source = "http://farm2.static.flickr.com/1279/831515206_eacd729609.jpg?v=0";
                                  cursorId = CursorManager.setCursor(busyCursorSymbol);
                          }
                          
                          private function loadComplete():void
                          {
                                  CursorManager.removeCursor(cursorId);
                          }
                          
                  ]]>
          </mx:Script>
          
          <mx:Image id="myImage" />
          <mx:Button label="Load" click="initImage()" />
          
  </mx:Application>
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.