Flash iOS 应用程序

发布于 2024-12-12 17:33:05 字数 241 浏览 0 评论 0原文

我目前正在使用 flash CS5 构建 iOS 应用程序,我需要一些有关以下功能的帮助:

  1. 是否可以添加应用内购买?如果是,那是如何运作的?
  2. 是否可以在应用程序中添加 iAd 广告?如果是这样,怎么办?如果没有,有什么好的替代方案可以与闪光灯一起使用吗?
  3. 如何从应用程序内保存数据,以便在用户重新启动应用程序甚至设备(例如床头板等)时数据会被吃掉?

非常感谢任何帮助! :D

I am currently building an iOS application with flash CS5 and I would need some help with a couple of the features:

  1. Is it possible to add in-app purchases? If yes, how does that work?
  2. Is it possible to add iAd advertising to the app? If so, how? If not, is there any good alternative that works with flash?
  3. How can I save data from within the app so it will be there eaten if the user restarts the app and even the device (like for a headboard and such)?

Any help is highly appreciated!!! :D

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心意如水 2024-12-19 17:33:05
  1. 如果是几个月前就好了。那么答案将是明确的。然而,目前的答案是“也许”(或者如果您是乐观主义者,“可能”)。随着 Air 3.0 的发布,它现在支持本机扩展。这些扩展是本机代码,周围有一个包装 API,以便可以在 Air 应用程序中进行编译和调用。

    事实上,我决定在研究这个答案时快速环顾四周,并找到了一个存储库,看起来有人已经实现了通过 ANE 进行应用内购买。但我还没有亲自测试过这个扩展,但这可能是了解它是如何实现的一个很好的起点。

    您之所以找不到太多有关 ANE 的信息,是因为它们最近才在上个月发生的 Air 3.0 更新中得到支持。目前 Flash CS5(或 5.5)或 Flash Builder 4.5 不支持它们。它们在 Flash Builder 4.6 中受支持,目前处于封闭测试阶段。不过你也许还能潜入,而且应该很快就会发布。

    最大的“缺点”是这些扩展需要以您的目标设备的本机格式开发。所以这意味着,如果你想制作一个 iOS 扩展,那么你可以在 Mac 上用 Objective-C 和 xcode 编写它。

  2. 与之前的答案几乎相同。使用 ANE 应该可以实现。但我还没有找到任何人这样做的例子。

  3. 将数据/状态保存到设备非常简单。您需要查看 SharedObject.getLocal() 方法(如果您想要 LSO)。或者您可以只使用低级 File 编写。查看File.applicationStorageDirectory。对于应加密到 < 的敏感信息code>EncryptedLocalStore 类,我相信 iOS 支持该类,但 Android 不支持。

    所有这些都应该为您提供在应用程序会话之间保存数据的好方法。

  1. If it were a few months ago. Then answer would be an unequivocal no. However, presently, the answer is "perhaps" (or if you are an optimist, "probably"). With the release of Air 3.0, it now supports Native Extensions. These extensions are native code that have a wrapper API around them so that they can be compiled in with and called from an Air application.

    In fact, I decided to look around real quick while researching for this answer and found a repo where it looks like somebody has implemented in-app purchases via a ANE. But I haven't tested this extension personally, but it may be a good starting point to see how it is implemented.

    The reason you wont find too much information about ANE's yet is because they were only recently supported in the Air 3.0 update that happened last month. They are currently unsupported in Flash CS5 (or 5.5) or Flash Builder 4.5. They are supported in Flash Builder 4.6, which is currently in a closed beta. But you might be able to sneak in still, and it should be released soon.

    The biggest "drawback" is that these extensions need to be developed in the native format for the device you are targeting. So that means, if you want to make an iOS extension, then you are writing it in Objective-C and xcode on a mac.

  2. Pretty much the same answer as before. It should be possible with a ANE. But I haven't found any examples of anybody doing it yet.

  3. It is very simple to save data/state to the device. You'll want to look into the SharedObject.getLocal() method if you want to the LSO. Or you can just use low-level File writing. Check out File.applicationStorageDirectory. For sensitive information that should be encrypted into into the EncryptedLocalStore class, which I believe is supported on iOS but not on Android.

    All of these should provide a good way for you to persist data between application sessions.

深海不蓝 2024-12-19 17:33:05

借助 AIR 3,您现在可以使用本机扩展来调用本机平台代码,以实现 AIR Actionscript API 未提供的功能。回答您的问题。

  1. 在应用程序购买中。我在 http://code.google.com/p/ 上有一个示例应用内购买-air-ios
  2. iAd。我在 http://code.google.com/p/iad-air 上有一个示例-ios/
  3. 正如其他人已经回答的那样,使用本地共享对象。

With AIR 3 you can now use native extensions to call into the native platform code to achieve the functionality not provided by AIR Actionscript APIs. To answer your questions.

  1. in app purchase. I have a sample at http://code.google.com/p/in-app-purchase-air-ios
  2. iAd. I have a sample at http://code.google.com/p/iad-air-ios/
  3. As others have already answered use local shared objects.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文