I'm building an Adobe Air 2.5. desktop application with Flash CS 5. The apps filesize is 10 MB with a medium amount of movieclips, vector graphics, bitmaps and code in it. It takes around 8 seconds from clicking the desktop icon until the app is available to work with.
How to improve the startup time?
Thanks. Uli
I think that you can decrease load time by placing on stage strictly what you need to show when the app starts.You can draw the rest of the assets upon request, dynamically.
So don't just drag everything on-stage.Instead, instantiate and addChild() as needed.
Depending on the asset size, it might take a little time to load, but cetainly the user won't have to wait 10 seconds before he/she can use your app.
Maybe not all of your app's content will be viewed in every single session, so why put everything on stage from the beggining?
Related
I have developed a system, in AS3 for Android, where one video after another plays, but after letting them run for an hour or two, the videos show between cut or slow. That happens when I run it on an android with device, but that does not happen on my PC. I have used the "dispose()" of the NetStream and set the NETSTREAM to NULL. Could someone tell me what's wrong? I've also set hardware acceleration to "DIRECT" and RENDER MODE to "AUTO". Oh, I also use System.gc();
I'm having an issue where my flash project crashes during 'Crazy kid Testing' - Where we click the same button several times and then do the same on another button. If the same button is clicked repeatedly, 10-12 times, Flash Player (SWF) crashes.
Is there any method to automatically reload the page when flash crashes WITHOUT user input? This will be used on a Kiosk in Firefox (latest).
Vesper had the right idea when it comes to both using ExternalInterface and probing for memory leaks and resolving those leaks.
You should debug your Flash app for memory leaks first, because Flash
crashing is not a sign of good application. And if Flash would still
crash after all memory leaks eliminated, you should reduce the memory
footprint of your app. Anything beyond, and only a watchdog could save
you. – Vesper Jun 6 at 18:20
I am developing a 2d game using LibGdx framework , when i press HOME button and then resume the game it freezes for 3-4 secs as the textures are being reloaded . I have used AssetManager to load the TextureAtlas & then getting the images by findRegion . I referred to documentation for "Texture" (http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Texture.html) and it mentions that " If the OpenGL context is lost all managed textures get invalidated. This happens when a user switches to another application or receives an incoming call. Managed textures get reloaded automatically.". I am confused what to avoid this delay !!
Kindly Help
Thanks
There will always be a delay on resuming the game.
This is because on android if you press home button or switch to another app a so called context loss occures.
When a context loss occurs on Android, it means that the operating system has decided to forcefully free the memory that was occupied with your loaded assets.
When you switch back to the game you need to reload these assets again to prevent the game from crashing and this reloading is reason for the delay.
Hi I'm creating an adobe AIR application..Its working fine ,But I want to make my application without performance issues..How to Check Adobe AIR applications performance ?Is there any tools available?
Take a look at Adobe Scout
"Adobe Scout is the next-generation profiling tool for Adobe Flash Player and AIR."
When building any flash application you define the application FPS. If the real FPS (flash can skip frames under high load) is lower than the defined FPS- you have troubles. You can check the FPS by vast variety of FPS meters here.
If your real FPS coinsides with the defined one - it is great, but try rising the defined FPS value up to 120 (which is max) and check out the real value, it is hardly be higher than 60 during animations, but the higher you can get - the better your application is. With this approach you can eliminate or at least point out "slow code".
ADD: It also worth mentioning that if the defined FPS value is 24, and the application is in stable state (the amount of animation, animation complexity and computational complexity stay more or less the same) the real value will "float" across some value, let's say 23 FPS with the spread of 1-2 (i.e. 22.7, 23.5, 23.9, 23.1, etc). And the mean value will be always lower than the defined FPS value.
Try to check memory usage. I would start trying to launch Flash Builder profiler remotely while your app is running live on the device and check out memory utilization. Refer this
Try to check redraw regions. Note that MovieClips that are not visible (e.g. throbbers) are still redrawing unless the are stopped. So if you see some region redraws without sencible reason - try to figure out why. The ideal case is to call stop() and visible=false or remove from stage the unused animations.
ADD: Redraw regions indicator is a part of Debug version of Flash Player. You can enable it through the context menu of the debug version of Flash Player.
UPDATE: I added some details to my answer as I see the interest to the Adobe Flash Perfomance issue. I don't remember the exact acticle, but I found a lot of usefull advices on the Abode's site, now I see that the number of such articles there increased.
Also I didn't know about the Adobe Scout before, but it sounds promising. I'll definately try it soon.
I had been developing one Flex application , in that users are allowed to upload there own swfs . The problem is, my application has a frame Rate of 11 , if the user tries to upload the swf with higher frame and audio with it( ie Framerate of 24 with AudioFLV ). this makes my application to run at the higher frame rate of that same user uploaded swf.
Can anyone pls help on this strange issue . i dont know how to overcome it.
There can be only 1 framerate in your app.
The loaded swf can access the stage and change the framerate.
So basically you cannot have access or restrict the swf loaded by your users not to change the fps.
You could always manually set the app fps to 11 each time the loaded swf ends.
This is not a solutions, but more a workaround.