【发布时间】:2012-04-16 01:00:03
【问题描述】:
快速问题:为什么 adobe air 在 iPad 上加载时出现黑屏(应用首次启动时的初始加载屏幕)?有没有办法通过加载舞台上存在的位图或影片剪辑来解决它?
干杯
【问题讨论】:
标签: actionscript-3 air
快速问题:为什么 adobe air 在 iPad 上加载时出现黑屏(应用首次启动时的初始加载屏幕)?有没有办法通过加载舞台上存在的位图或影片剪辑来解决它?
干杯
【问题讨论】:
标签: actionscript-3 air
没有 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 在应用加载时显示。
【讨论】: