StarlingGraphics / Starling-Extension-Graphics

flash.display.Graphics style extension for the Starling Flash GPU rendering framework
https://github.com/StarlingGraphics/Starling-Extension-Graphics/wiki
MIT License
282 stars 89 forks source link

Shapes cannot be touched #139

Closed kerissakti closed 9 years ago

kerissakti commented 9 years ago

I encountered another problem with the latest code, this time I'm trying to register touch events to the shapes. In the past I'm able to do this, but now the shapes don't even return any touch events, even after explicitly setting touchable = true. the easiest to observe this is to set the useHandCursor = true, when you move your mouse over the shape it doesn't change to the hand cursor

var shape:Shape; shape= new Shape(); shape.graphics.lineStyle(1, 0xffffff); shape.graphics.beginFill(0xffffff); shape.graphics.drawRect(0, 0, 100, 100); shape.graphics.endFill(); shape.touchable = true; shape.useHandCursor = true; addChild(shape);

IonSwitz commented 9 years ago

Found and Fixed.

Thanks for protecting myself from breaking everything.