Adobe Air在iPad上的首次加载屏幕AS3。

3
快速提问:为什么Adobe Air在iPad上加载时会出现黑屏(当应用程序首次启动时的初始加载屏幕)?是否可以通过在舞台上存在的位图或MovieClip上加载来解决它?
谢谢。
2个回答

3

没有使用 Flex

是的,在 iOS 上不使用 Flex 也可以实现。这个过程涉及将一个默认图像放置在项目根目录中。

更多信息可以在这里找到:

http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac1e63e3d129907d2886-8000.html#WS901d38e593cd1bac58d08f9112e26606ea8-8000

在 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/


对不起 :) 我的意思是我可以使用AS3 来实现这个吗? - Bill
2
在iOS上,您不需要AS3来添加启动图像。实际上,只需将Default.png添加到您的项目根目录即可。请查看我发布的第一个链接。 - francis

1

这里似乎有一些误导性的内容。

在iOS上,您需要设置splashScreenImage并包含“Default.png”

当应用程序启动时,您将立即看到“Default.png”图像被放大。几乎在此之后,您将看到“SplashScreenImage”显示。

默认图像显示在应用程序开始加载之前... SplashScreenImage在应用程序加载时显示。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接