3 Replies Latest reply on Dec 19, 2013 3:24 AM by Gopinath Ravichandran

    Splash screen for a desktop app (non mobile app)

    mariana22b

      I'm using fb4linux, 4.5.1A SDK, I'm developing a non-mobile (i.e. desktop application) and I would like to add a splash screen to it.

      I've added mobilecomponents.swc to the library path, and the application starts like this:

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx"
         width="400" height="400" xmlns:local="*"
         preloader="spark.preloaders.SplashScreen"
         splashScreenImage="@Embed('assets/splashscreen.png')"
         splashScreenMinimumDisplayTime="1500">

       

       

      When I debug it, no splash scren is shown and I get the following error:

      ReferenceError: Error #1065: Variable flash.display::StageAspectRatio is not defined.
          at spark
      .preloaders::SplashScreen/prepareSplashScreen()[E:\dev\4.5.1\frameworks\projects\mobilecomponents\src\spark\preloaders\SplashScreen.as:340]
          at spark
      .preloaders::SplashScreen/Stage_resizeHandler()[E:\dev\4.5.1\frameworks\projects\mobilecomponents\src\spark\preloaders\SplashScreen.as:407]

       

       

      The problem seems to be triggered by the line that sets the preloader, because if I remove it, the error is gone (although no splash screen is shown either).

      Any ideas how to make it work?

      Thanks!