移动设备友好游戏?

时间:2014-04-28 06:47:05

标签: actionscript-3 flash mobile

这是什么意思?
我有什么需要照顾的?
我正在编写一个AS3游戏,只能用“鼠标点击”播放。 移动设备是否已经友好?或者是“Touch Friendly”?

我想:

// touch / mobile un-friendly
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);

// touch / mobile friendly
stage.addEventListener(MouseEvent.CLICK, onMouseClick);

1 个答案:

答案 0 :(得分:1)

它应该适用于简单的交互。如果你想要更复杂的东西(手势等),你必须使用触摸事件(http://help.adobe.com/en_US/as3/dev/WS1ca064e08d7aa93023c59dfc1257b16a3d6-7ffe.html)。为了在移动设备上获得更高的性能,我建议您使用像Starling(http://gamua.com/starling/)这样的框架。