简体   繁体   English

在flex中设置自定义鼠标光标

[英]Set Custom Mouse Cursor in flex

following is my flex 3 code. 以下是我的flex 3代码。

[Embed(source="SizeNESW.png")] [Bindable] public var cursor:Class; [Embed(source =“ SizeNESW.png”)] [可绑定]公共var cursor:Class;

private function mouseOver():void { CursorManager.setCursor(cursor); 私有函数mouseOver():void {CursorManager.setCursor(cursor); } }

here what i am doing that there are four corners above the image for resizing purpose. 在这里,我正在做的工作是在图像上方有四个角,用于调整大小。 and i have a single image for cursor. 而且我有一个光标图像。 i want to use that image for all corners of the image. 我想将该图像用于图像的所有角落。 ie i need to rotate that cursor image for different corners. 即我需要旋转该光标图像不同的角落。

ne help im stuck :( 我帮忙我卡住了:(

Try to create four copies of rotated image with BitmapData.draw (using rotated matrix). 尝试使用BitmapData.draw(使用旋转矩阵)创建旋转图像的四个副本。 Note that CursorManager.setCursor returns int - you'll need it to remove custom cursor. 请注意,CursorManager.setCursor返回int-您将需要它来删除自定义光标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM