Flex中CursorManager的应用

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white" viewSourceURL="srcview/index.html">

<mx:Script>
<![CDATA[
import mx.managers.CursorManager;

[Bindable]
[Embed(source="assets/bug.png")]
private var BugIcon:Class;

[Bindable]
[Embed(source="assets/bug_delete.png")]
private var BugDeleteIcon:Class;

private var cursorID:int;
]]>
</mx:Script>

<mx:ApplicationControlBar dock="true">
<mx:Button label="setBusyCursor()"
click="CursorManager.setBusyCursor();" />
<mx:Button label="removeBusyCursor()"
click="CursorManager.removeBusyCursor();" />
</mx:ApplicationControlBar>

<mx:Button label="setCursor()"
width="100"
height="100"
rollOver="cursorID = CursorManager.setCursor(BugIcon);"
rollOut="CursorManager.removeCursor(cursorID);" />

</mx:Application>
posted on 2010-05-13 16:57  念时  阅读(335)  评论(0编辑  收藏  举报

细节决定成败!态度决定一切!