flex4 更改鼠标样式啊
想把系统的那个默认的load样式替换掉。。
就是那个“小闹钟”
谁有例子啊??
[解决办法]
<?xml version="1.0" encoding="utf-8"?>
<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" minWidth="955" minHeight="600" creationComplete="initCursor()">
<fx:Script>
<![CDATA[
import mx.managers.CursorManager;
[Bindable]
[Embed(source="Media/Plan.png")]
public var cur:Class;
private function initCursor():void
{
CursorManager.setCursor(cur);
}
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
</s:Application>
[解决办法]
鼠标本身没有busy不busy的
而是你自己加代码告诉程序什么时候应该是busy,呵呵
不知道你明白不
[解决办法]
这也是一种方法,自己程序去判断设置相应的鼠标样式;但flex内部是有一套特殊样式的,那就是busy样式,当你调用CursorManager.setBusyCursor();的时候,或者在后台请求过程中的时候,例如
<mx:HTTPService showBusyCursor="true" ...
程序会自动将鼠标变成忙碌状态,默认是一个小钟(mx.skins.halo.BusyCursor);
但是这个图标是可以设置的:
<mx:Style>
CursorManager
{
busyCursor: Embed(source="BuzzyBee.png");/*设置忙碌状态的图标*/
}
</mx:Style>