Skip to content

Instantly share code, notes, and snippets.

@matthua
Last active December 16, 2015 03:39
Show Gist options
  • Save matthua/5371093 to your computer and use it in GitHub Desktop.
Save matthua/5371093 to your computer and use it in GitHub Desktop.
Flash AIR SKD 3.7适用
import flash.system.*;
var aLoader:Loader = new Loader();
var url:URLRequest = new URLRequest("swfs/SecondarySwf.swf");
var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
aLoader.load(url, loaderContext); // 加载 SWF 文件
@matthua
Copy link
Author

matthua commented Apr 12, 2013

针对 Adobe AIR 应用程序的 Mac Retina (hiDPI) 显示屏支持
该功能支持将 AIR 应用程序打包到受支持的 Mac 上的 Retina (hiDPI) 显示屏。 要启用 Retina 显示,可在应用程序描述符中添加以下元素。
请注意,此标记当前仅适用于 Mac OS。
对于 iOS AIR 应用程序,在 部分中有一个作用相同的标记,名为 。

.. 中略… high --> … 中略 …

将应用程序描述符命名空间更新为 3.6,然后重新对应用程序打包。(将 元素设为“standard”,或完全不包含该元素,可以禁用 Retina 显示支持。)

该功能存在几个限制:

  1. 不支持通过 HTMLLoader 显示的内容。(请改用 StageWebView,以实现在 Retina 显示中显示您的 HTML 内容。)
  2. 使用 3.5 或更早版本编写的现有应用程序将不会以 Retina 分辨率显示。

支持多个 SWF

该功能支持在 iOS 上以 AOT 模式打包和加载多个 SWF。借助该功能,用户可以使用 Loader 类在 AIR iOS 应用程序中使用多个 SWF。在 iOS 上使用该功能存在几个限制:

  1. 由根 SWF 加载的二级 SWF 应与根 SWF 具有相同的应用程序域,否则,加载二级 SWF 会产生以下错误:
    错误 3747:操作系统不支持多个应用程序域。以下是加载二级 SWF 的正确方式:
    var aLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("swfs/SecondarySwf.swf");
    var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
    aLoader.load(url, loaderContext); // 加载 SWF 文件

  2. loader 类的方法 unload() 和 loadBytes() 在 iOS 上无效。

  3. 可以在应用程序中打包的 SWF 数目将取决于计算机的能力,因为打包 IPA 时,计算机可能内存不足,从而因内存不足错误导致打包失败。

http://helpx.adobe.com/cn/flash-player/release-note/fp_116_air_36_release_notes.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment