• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1068
  • Last Modified:

flex showHandCursor on SWFLoader

I want my flex SWF to "showHandCursor" when the cursor is over a SWFLoader image. How do i do this?
0
baboa
Asked:
baboa
2 Solutions
 
julianopolitoCommented:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
      xmlns:mx="http://www.adobe.com/2006/mxml"
      layout="vertical"
      creationComplete="init()">
      <mx:Script>
            <![CDATA[
                  import mx.managers.CursorManager;
                  [Embed(source="img/handCursor.png")]//embed a 10px image of hand cursor
              private var cursor:Class;
                  private var cursorID:int;
                  private function init():void{
                        swf.addEventListener(MouseEvent.MOUSE_OVER,showCursor);
                        swf.addEventListener(MouseEvent.MOUSE_OUT,removeCursor);
                  }
                  private function showCursor(e:MouseEvent):void{
                        cursorID = CursorManager.setCursor(cursor,2,-5,-5);
                  }
                  private function removeCursor(e:MouseEvent):void{
                        CursorManager.removeCursor(cursorID);
                  }
            ]]>
      </mx:Script>
      <mx:SWFLoader id="swf" source="my.swf"/>
</mx:Application>
0
 
evcrCommented:
buttonmode=true ?
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now