【问题标题】:adobe air ipad first load up screen AS3adobe air ipad 首次加载屏幕 AS3
【发布时间】:2012-04-16 01:00:03
【问题描述】:

快速问题:为什么 adobe air 在 iPad 上加载时出现黑屏(应用首次启动时的初始加载屏幕)?有没有办法通过加载舞台上存在的位图或影片剪辑来解决它?

干杯

【问题讨论】:

    标签: actionscript-3 air


    【解决方案1】:

    没有 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 来实现吗?
    • 在 iOS 上,您不需要 AS3 来添加启动图像。它实际上只是将 Default.png 添加到您的项目根目录中。检查我发布的第一个链接
    【解决方案2】:

    这里似乎有些误导。

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

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

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

    【讨论】:

      猜你喜欢
      • 2012-12-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多