After this line is called, the handleTouchBegin is never called.
I’m using openfl through HaxeFlixel but after a lot of testings, it isn’t related to HaxeFlixel.
Also, I don’t get why the event is called “touchBegin” whereas it should be “touchstart”. But replacing in the code “touchBegin” by “touchstart” doesn’t change anything.
Is anyone experiencing this issue ?
EDIT:
flash_display_Stage.prototype method getOnTouch is triggered whereas method onTouch is never triggered on IOS
If you would like to explore further, the class you are looking for is “lime.ui.Window”, “registerWindow” adds the event listeners, and “handleEvent” is where it processes them. Is this specific to your project, or does it occur even with PiratePig or other sample projects? (or is that fine because it looks for mouse, not touch events)?
It’s listening to the Lime window element, which is a DIV usually. Perhaps it needs to listen to the full document instead of a child element in some devices?
Well, in my output. Events are bounds to the window target in the flash.display.Stage object
var o = window;
o.addEventListener("touchmove",this.getOnTouch(0));
o.addEventListener("toucheend",this.getOnTouch(2));
...
I’m pretty sure this var o = window is configurable somewhere to target the DIV element ?
If it were listening to a child element, it should work since it’s part of the DOM, however, a Window object is not part of the DOM and therefore is not taken into account in some devices browsers.
…but perhaps the fact that the variable is called “window” could cause problems on certain browsers, could always try using _window:Window and _window.element to double-check if this is the problem
If you’re having trouble with bitfive, you can try compiling using -Dno-custom-backend, which should disable OpenFL custom backend support, so it uses the standard HTML5 backend instead
C:/HaxeToolkit/haxe/lib/openfl-bitfive/2,0,1/openfl/Assets.hx:487: characters 31-57 : DefaultAssetLibrary should be openfl.AssetLibrary
C:/HaxeToolkit/haxe/lib/openfl-bitfive/2,0,1/openfl/Assets.hx:487: characters 31-57 : For function argument 'library'
C:/HaxeToolkit/haxe/lib/lime/2,0,0-alpha,8/lime/system/System.hx:75: characters 2-35 : Class<ApplicationMain> has no field config
C:/HaxeToolkit/haxe/lib/lime/2,0,0-alpha,8/lime/system/System.hx:76: characters 2-32 : Class<ApplicationMain> has no field config
C:/HaxeToolkit/haxe/lib/lime/2,0,0-alpha,8/lime/system/System.hx:77: characters 2-24 : Class<ApplicationMain> has no field create
It’s working as it should (though there’s an annoying bug that causes the system cursor to always show up), -Dno-custom-backend is meant to be added before you’re calling in Flixel:
Yeah, we need to look at making sure our support of hiding the mouse cursor made it to Lime, it was in OpenFL HTML5 but it might have been lost in the translation