silexlabs / Cocktail

An HTML/CSS rendering engine for the Haxe language
http://www.silexlabs.org/haxe/cocktail/
Other
192 stars 34 forks source link

[Fault] exception, information=ReferenceError: Error #1069: Property get_target not found on flash.events.MouseEvent and there is no default value. #419

Open Espigah opened 10 years ago

Espigah commented 10 years ago

[Fault] exception, information=ReferenceError: Error #1069: Property get_target not found on flash.events.MouseEvent and there is no default value.

Class: cocktail.port.platform.flash_player.MouseListener line:198

localPoint = _platform.convertToHitTestingSpriteSpace(localPoint, event.get_target(), _platform.hitTestingSprite);

Espigah commented 10 years ago

var hasGetTargtMethod:Bool = Reflect.hasField(event, "get_target");

var targetDisplayObject = hasGetTargtMethod ? event.get_target() : event.target;

localPoint = _platform.convertToHitTestingSpriteSpace(localPoint, targetDisplayObject, _platform.hitTestingSprite);