You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by "Erik J. Thomas" <er...@linqto.com> on 2017/12/23 20:17:12 UTC

Using non-embedded image in SplashScreenImage

Hey all:

One of my AIR mobile apps is big and contains 7 ANE libraries, and takes about 3 seconds for the AIR runtime to load the SWF before my first view can display.

The native iOS launch screen only displays for about 1 second, leaving about 2 seconds of blank screen before the app displays.

Using a preloader (SplashScreenImage) I can fill that time with another image so it appears to be one splash screen until the SWF is added to the stage. This works well if the image is statically embedded (build time) using Embed annotation or @Embed in an Image.source assigment.

But I need to display a splash that didn't exist at compile time so I cannot Embed the image. I need to dynamically load the image from disk (using Loader) but there's no way to do that with SplashScreenImage or SplashScreen preloaders. At least I can't find a way. There is only a getImageClass() method I can override in a custom SplashScreenImage preloader class, but it requires returning an image Class so essentially it requires an image that was compiled into the SWF. That won't work for us.

Anyone else ever solved this?

Thanks.

Erik

Re: Using non-embedded image in SplashScreenImage

Posted by "Erik J. Thomas" <er...@linqto.com>.
Hi M.Prabhu:

I probably didn't explain myself very well. The problem is I cannot use SplashScreenImage preloader and set the minimum display time at all because I cannot embed the splash screen image. It's dynamically pulled from the IPA package root folder at run time. The reason is complicated but we "brand" our white-label app dozens of times and the process is to let our partners upload their own custom splash screen during "branding" and we place it into the IPA and APK root folders and refer to that at runtime. We cannot compile the app (and embed the images) for each "branded" instance. That process doesn't scale.

But I think I know how to solve this now by creating my own preloader class that implements IPreLoaderDisplay. My mistake was trying to use the existing spark.preloaders.SplashScreenImage class as-is and it's set up for using embedded images which makes sense because it would be faster to display quickly if embedded. 

Thanks for your feedback but I think I'm good to go. 

Erik

On Dec 25, 2017, at 10:10 PM, Prabhu Moorthy <Pr...@symphonysummit.com> wrote:

Hi,

You can try with the property splashScreenMinimumDisplayTime in the
application root tag.
The default value is 1000 milliseconds.

This will resolve your blank screen problem.

Thanks & Regards,
M.Prabhu



-----
Thanks & Regards,
M.Prabhu
--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/



Re: Using non-embedded image in SplashScreenImage

Posted by Prabhu Moorthy <Pr...@symphonysummit.com>.
Hi,

You can try with the property splashScreenMinimumDisplayTime in the
application root tag.
The default value is 1000 milliseconds.

This will resolve your blank screen problem.

Thanks & Regards,
M.Prabhu



-----
Thanks & Regards,
M.Prabhu
--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/