2012-04-16 66 views
3

快速的問題:爲什麼adobe會在iPad上加載黑屏(應用程序第一次啓動時的初始加載屏幕)?有沒有辦法通過載入位於舞臺上的位圖或movieClip來解決它?adobe air ipad第一次加載屏幕AS3

乾杯

回答

3

沒有的Flex

是的,這是有可能在iOS上,而無需使用柔性的。這個過程涉及在您的項目根目錄中放置一個默認圖像。

更多信息可以在這裏找到:

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開始,您還可以設置一系列閃屏圖像,以便在不同尺寸的屏幕上使用。

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

+0

只是閃光生成器,我沒有使用柔性... – Bruce 2012-04-16 02:57:26

+0

更新,使更清晰 – francis 2012-04-16 11:47:35

+0

對不起:)我的意思是我可以使用as3來實現嗎? iOS上的 – Bruce 2012-04-16 12:52:00

2

似乎

這是通過定義一個SpashScreenImage.mxml文件中完成這裏有些誤導。

在iOS上,您需要設置splashScreenImage,包括了「爲Default.png」

當應用程序啓動時,您會立即看到「爲Default.png」圖像被放大。幾乎在此之後,您將會看到「SplashScreenImage」。

默認圖像顯示在應用程序開始加載之前... SplashScreenImage顯示爲應用程序加載。