Forum Discussion
Storyline preload handling
onEnterFrame (James Kingsley) said:
SL seems to start preloading by loading the current slide's assets along with the ones before and after. Then it starts loading everything from the first slide to the last.
My guess is your load indicator doesn't display because SL doesn't display the swf until its 100% loaded.
Our preloader loads all assets from first to last slide. It tracks the loading and updates the progress bar (and an SL var) so the student can see what is happening. In addition since we are updating that SL var you can build some logic in to disable the Next button until X% is loaded.
If you want to display progress for an individual SWF I would recommend you build two SWFs. One will be the "real" content the other is a "loader". The "loader" should be same display size as the content. It will perform a simple loadMovieClip to pull in the "real" content while showing progress. Put the "Loader" file on the SL slide. After publishing SL copy the real content into the proper folder to match the path you put in the loader swf.
Keep in mind that mileage will vary. Caching files is very much dependent on the browser, OS, and user settings.
A wheel within a wheel... yeah, putting a Flash preloader wrapper .swf around the content .swf should work just dandy except that in the content .swf, I am making an ExternalInterface call from the .swf back to Storyline to let Storyline know when the learner has completed the interaction in the .swf... my guess is it would probably still work, but I ran out of time to experiment. Also, obviously by going this route, we would lose out on Storyline's ability to preload the content in the background, essentially forcing the content to load only when the end-user hits that screen.
I ended up re-rigging things so that a "Loading, please wait..." text box is shown in Storyline rather than in my .swf and when the .swf is completely loaded, it executes the following code:
ExternalInterface.call('GetPlayer().SetVar','stateFromFlash',"flash_loaded");
Then, within Storyline, I have a trigger watching for changes to variable 'stateFromFlash' and when it gets set to "flash_loaded", I hide the loading text box.
Not the most elegant solution, but it seems to be working fine.
Maybe when (or if, at this point) the Storyline SDK gets released we will have some better methods for Flash<>Storyline communication???
Related Content
- 11 months ago
- 10 months ago
- 11 months ago
- 9 months ago