Reputation: 2228
Basically we start a offline mobile application it will load and unload swf files dynamically. Each swf file will be more than 5 MB, its okay for offline version. But they are asking now for web version.
Now loading taking too long time for slow internet connections. So I think if I load part by part(like youtube) it will be better.
But I don't know, how to load part by part. Please help me with your ideas.
Upvotes: 1
Views: 136
Reputation: 18747
It shouldn't be any better than just loading SWF by SWF, exactly because of unresolved dependencies within your main SWF's logic. You can make your main SWF load only crucial modules first, then open up without say sounds or music available, displaying the info that sounds are still loading, music is still loading, etc etc, and starting to load these too, and once loaded, launch music or enable sound playback.
YouTube player is able to load the videos part by part because later parts of the video are independent on what's currently playing, which is not the case with Flash applications, these are required to be fully loaded to work properly, at least the main SWF should be loaded first to initialize loading of its modules and provide basic user experience. Moreover, IE11 decided to stop displaying SWFs while they are not fully loaded (without other modules that may be loaded at runtime), thus eliminating people's preloaders from being displayed while the SWF is not yet fully loaded.
So I say that you should first determine whether your main SWF is able to survive without some content, separate that content out of main SWF and handle their intermittent unavailability within your application.
Upvotes: 1
Reputation: 101
If your server can serve files partially, you can download all the parts as separate ByteArray. After that, all merge into one ByteArray and load the SWF by methos Loader.loadBytes()
Upvotes: 0
Reputation: 2101
I guess the 5MB swfs are modules for the main swf. So assume your module swf A contains some big images, maybe 20 png files and each file is 200K. Try to put the image file on the server side and load them when you module swf is loaded. It will be quick for the user to see the module swf with base functions(with basic ui element like buttons), then the external images appear one by one slowly.
Remember to compress your png files when you put them on the server side, like pngoo.
Upvotes: 0