Forum Moderators: open
This is my problem:
I need to preload .jpg photos to the use of a .swf file. The idea of the gallery is very simple: some 30 pictures should be shown without delays one after another by using "next" and "previous" buttons. So preloading is needed.
I have learned that one can preload .swf movies by using Javascrict (Thanks to RonPK!). Check out here:
[webmasterworld.com...]
I tried to do the same to my .jpg files but with bad results: nothing happened.
If somebody could help me and tell me what's wrong and what should I do I would be a happy man. The source code of my .html which includes the javascript preload code etc. is here:
[mlab.uiah.fi...]
thanks
Yolk
You can dynamically load .jpg's from within Flash MX and up.
This is done using the "loadMovie()" method.
It would be wise to include a preloader for these images so the user knows what's happening.
The javascript from the thread you mentioned only preloads those objects to the user's cache not into the .swf itself.
Essentially all you are doing is loading those pictures into your cache but not doing anything with them yet.
Personally, it would be best to load these images, with a preloader for the images, from within Flash. It would make your slideshow application more self-sustaining(ie. flash takes care of all operations without the need for outside help (read: javascript).
Hope this helps,
winstun