对 FireFox 和 iPod(Safari?)上的 HTML5 鼠标事件做出反应
我正在更新我的滚动游戏引擎以输出它生成的滚动地图的HTML5代码,以便它可以不仅可以用作(某种程度上特定于平台的)完整游戏创建器,还可以用作跨平台 HTML5 滚动地图编辑器。我克服了支持图形着色的挑战,如我的 之前的问题。我在 http://sgdk2.enigmadream.com/ben/ 上运行了一个很好的示例。但我注意到用于滚动地图的鼠标交互在 FireFox 或 iPod 上不起作用。看起来 iPod 可能会根据 Mobile Safari(iPad、iPod、iPhone)中的本机 HTML5 拖放?。这并不能解释为什么 FireFox 不会做出反应。难道没有更通用的方式来支持鼠标或触摸交互吗?触摸事件也适用于鼠标,还是特定于触摸?您建议如何以最跨平台兼容的方式与此滚动地图进行交互?
I am updating my scrolling game engine to output HTML5 code for the scrolling maps it generates, so that it can be used not only as a (somewhat-platform-specific) complete game creator, but also as a cross-platform HTML5 scrolling map editor. I got past the challenge of supporting the graphic tinting as described in my earlier question. And I have a nice sample running at http://sgdk2.enigmadream.com/ben/. However I have noticed that the mouse interaction for scrolling the map does not work on FireFox or on an iPod. It looks like iPod may use different events (ontouch etc) according to Native HTML5 Drag and Drop in Mobile Safari (iPad, iPod, iPhone)?. And that doesn't explain why FireFox wouldn't react. Isn't there a more universal way to support mouse or touch interaction? Do the touch events also work for mouse, or are they specific to touch? How would you recommend interacting with this scrolling map in the most cross-platform compatible way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要正确检索您的 srcElement
尝试一下
P.S.:请参阅 目标
you need to correctly retrieve your srcElement
try it
P.S.: see targets