I’ve read all threads here already about this subject. For most AdobeAir projects for Android, no matter what size, it could take up to 20 sec to load the app, and while it loads, all you see is a black screen. As there’s no support for a Default.png like there is for iPhone, we have to use a preloader.
I’ve only found one for Flex, which is no good to me as I’m using Flash Pro 5.5 (IDE). I’ve tried doing some simple preload-a-swf-preloader but it just loads it to 100% before showing anything anyway.
Anyone here that can share a script of a simple preloader for Flash CS5.5?
I know that to reduce the loading time and show a splash screen on android we need to make a very small swf that will contain the loading screen image, and that same swf will also preload the maingame.swf (but can that be done? Appstore don’t like code in more than one swf) into it. My tries have failed.
Here’s some quotes in case someone who reads this might be knowledgable enough to help me out:
Yes its possible to get a splash to appear straight away (well within one to 2 seconds which is close enough) but
(a) You have to create a small splash .SWF which loads your main .SWF (OK so that's fairly obvious but a "Default.PNG" splash screen facility as per the iPhone packager and FLEX projects is what you might expect)
(b) Your splash .SWF must embed the splash image. If you try to dynamically load an image nothing will appear until the whole of the APK file is loaded ( and presumably initialised). That was what I was doing wrong.
It takes 20 sec to load, it's all black before it's done loading and the runtime takes up 25mb!
(1) Yes that is a bit of a problem but seems to be the cost of compiling in the AIR runtime. I am sure that most mobile projects only use a subset of the entire AIR library - its a shame you can't just compile in the bits that you need and drop the rest.
(2) This is partly because of (1) and the fact it takes so long to get a big file up and running with AIR. You need to create a preloader that is very small and all it does is display a splashscreen and then loads in the main 25mb file that you embed in the assets of your preloader. The small preloader appears quickly and then gives you time to do your ‘work’ loading the main app with something onscreen. This gives an example / explanation and there are others out there :
www.mcbrearty.me.uk/index.php/2011/05/09/actionscript-mobile-project-splash-screen/