如何在 AIR 中为 Android 添加多个页面

How to add multiple pages in AIR for Android

我想在我的 Android 应用程序中添加多个页面,类似于我 phone 上的主屏幕,我希望能够左右滑动以查看多个页面。

我正在使用 "AIR 16.0 for Android" 在 Adob​​e Flash CC 2014 中开发我的应用程序。

有人知道我该怎么做吗?

对于这个问题,您可以采用不同的方法。您可以创建一些 SwipeGestures to detect that or you could go the way Flash went since 1999, setup a Movieclip (or many) and listen for onMouseDown (ontouchstart) events and then say mc.startDrag(); (you want to limit the drag-movement to the X axis). Then onMouseUp (ontouchend) you can determine if the current MC is relativly cented and then tween it into the middle of the screen, or if the page is to far left/right and therefore page to the next page. There is also a Touch Drag implementation out of the box with ontouchmove .

基本上,您正在寻找的是某种 coverflow for AS3 ... 或不那么花哨的东西。请让自己对 startDrag 和 StopDrag 感到满意,您将看到我是如何做到的。