快速提问:为什么Adobe Air在iPad上加载时会出现黑屏(当应用程序首次启动时的初始加载屏幕)?是否可以通过在舞台上存在的位图或MovieClip上加载来解决它?
谢谢。
谢谢。
没有使用 Flex
是的,在 iOS 上不使用 Flex 也可以实现。这个过程涉及将一个默认图像放置在项目根目录中。
更多信息可以在这里找到:
在 Android 上,我认为没有类似的功能。我认为它尝试接近:
http://swfhead.com/blog/?p=817
使用 Flex
当使用 Flex SDK 时,您可以在应用程序内设置启动屏幕:
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
splashScreenImage="@Embed('spash.png')"
splashScreenScaleMode="letterbox">
从Flex 4.6开始,您还可以设置一个启动画面图像数组,以用于不同尺寸的屏幕。
这可以通过定义SpashScreenImage.mxml文件来完成:
<s:SplashScreenImage xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
<s:SplashScreenImageSource dpi="160--" aspectRatio="portrait" source="@Embed('portrait.png')"/>
<s:SplashScreenImageSource dpi="160--" aspectRatio="landscape" source="@Embed('landscape.png')"/>
</s:SplashScreenImage>
回到您的应用程序中:
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
splashScreenImage="SpashScreenImage">
更多信息请参见:
http://devgirl.org/2012/01/20/flex-mobile-development-dynamic-splash-screens/
这里似乎有一些误导性的内容。
在iOS上,您需要设置splashScreenImage并包含“Default.png”
当应用程序启动时,您将立即看到“Default.png”图像被放大。几乎在此之后,您将看到“SplashScreenImage”显示。
默认图像显示在应用程序开始加载之前... SplashScreenImage在应用程序加载时显示。