Flex:如何设置手形光标?

Squ*_*iff 8 apache-flex cursor

我正在尝试将手形光标设置在HBox上.我已经尝试过buttonMode和useHandCursor,但没有运气.此示例显示忙碌光标.谁能告诉我如何让它显示flashPlayer的手形光标?

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:components="com.dn2k.components.*"  >

<fx:Script>
    <![CDATA[
        private var cursorID:int;
        //cursorManager

        protected function box_mouseOverHandler(event:MouseEvent):void
        {
            cursorManager.setBusyCursor()
        }
    ]]>
</fx:Script>

<mx:HBox id="box" useHandCursor="true" buttonMode="true" mouseChildren="false" backgroundColor="0xcc0000" mouseOver="box_mouseOverHandler(event)">
    <s:Label text="Hiya sexy..."/>
</mx:HBox>
Run Code Online (Sandbox Code Playgroud)

Con*_*ner 7

鼠标在容器上时,此代码完美显示:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark">
    <mx:HBox backgroundColor="0xcc0000" buttonMode="true" id="box" mouseChildren="false" useHandCursor="true">
        <s:Label text="Hiya sexy..." />
    </mx:HBox>
</s:Application>
Run Code Online (Sandbox Code Playgroud)


Noo*_*le2 0

杰夫说的话。您也可以使用CursorManager.setCursor(). 不过,您必须为光标嵌入一个图形。