waneck / testrepo

0 stars 0 forks source link

Issue 423 - Flash(10.2) native mouse cursor bug - haxe #423

Closed waneck closed 11 years ago

waneck commented 11 years ago

[Google Issue #423 : http://code.google.com/haxe/issues/detail?id=423] by hortobag...@gmail.com, at 2011-05-24T10:06:26.000Z What steps will reproduce the problem?

  1. flash9.ui.Mouse.hx and lash9.ui.MouseCursorData.hx lib is not correct, please compare with the Adobe doc.: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/ui/Mouse.html

Please complete the following class with minimal code reproducing the problem :

class Test { static function main() { var mouse_cursor_vector:Vector<flash.display.BitmapData> = new Vector<flash.display.BitmapData>(); mouse_cursor_vector[0] = new Crsr_move(); // this is an external BitmapData class - use any, max 32x32 png or jpg image

    var mouse_cursor_data:MouseCursorData = new MouseCursorData(); // this function take no parameter, but in flash9/ui/MouseCursorData.hx it takes a string

    Mouse.registerCursor(&quot;new_crsr&quot;, mouse_cursor_data);

    // the Mouse.cursor can get 2 types, but in flash9/ui/Mouse.hx  it can be only 1
    Mouse.cursor = MouseCursor.AUTO; // it switch back the mouse cursor into the default behaviour, type: MouseCursor
    Mouse.cursor = &quot;new_crsr&quot;; // this line switch the mouse cursor into the defined BitmapData, type: String

} }

Please provide any additional information below. Here is the corrected flash9/ui/Mouse.hx

package flash.ui;

extern class Mouse { @:require(flash10) static var cursor : Dynamic; // need String, and MouseCursor type - maybe @:multitype is the solution @:require(flash10_1) static var supportsCursor(default,null) : Bool; static function hide() : Void; @:require(flash10_2) static function registerCursor(name : String, cursor : flash.ui.MouseCursorData) : Void; static function show() : Void; }

And the corrected flash9/ui/MouseCursorData.hx

package flash.ui;

@:final @:require(flash10_2) extern class MouseCursorData { var data : flash.Vector<flash.display.BitmapData>; var frameRate : Float; var hotSpot : flash.geom.Point; var name : String; function new() : Void; }

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2011-07-14T21:33:17.000Z] This issue was closed by revision r3845.