First, prepare your custom cursor. e.g. mine is a ani file (recommend a cool site http://www.cursors-4u.com to download different kinds of cursor). Then convert your cursor file to swf, if the file is not swf and your cursor is animated one. OK, let me introduce the 3 ways below: Maybe you know setBusyCursor and removeBusyCursor methods of CursorManager, but setCursor and removeCursor are more flexible. you can prepare a custom class , representing and embedding a cursor swf, as a parameter of setCursor, just like: it's a easier way. CursorManager has a style called "busyCursor". So what you should do is , changing to your own class at the begginning of application, e.g. in preinitialize event hanler of Application, like: StyleManager.getStyleDeclaration("CursorManager"). setStyle("busyCursor",myBusyCursor); //myBusyCursor is class, embedding cursor swf i think CSS must be the easiest way. CursorManager
{
busyCursor: Embed("../libs/cur.swf");
} Put it in css file or whereever you like. no problem.
{
busyCursor: Embed("../libs/cur.swf");
} Put it in css file or whereever you like. no problem.
本文介绍了如何使用不同的方法为应用程序设置自定义光标。包括准备光标文件、将光标文件转换为SWF格式,以及利用setCursor方法、样式管理器和CSS三种方式实现自定义光标的显示。

被折叠的 条评论
为什么被折叠?



