Flash AS structure advice
- Started
- Last post
- 7 Responses
- vaporstouch
I am building a flash gallery for a photographer. Basically, when a section(food for ex) is selected I want to load the images one by one via XML, each with its own preloader. (the preloader is part of the design so thats why I want to do it this way). These will be resized to thumbnails, so as soon as the first one loads it will be ready to be clicked. So to do this, should i:
- load the XML
- have one MC with the preloader that i will attach from the library and load the .jpgs into? (this is what i am sketchy on)
thanks
- vaporstouch0
has anybody preloaded external jpgs indiviually? should i just use one empty MC with a preloader in it and load them into it?
- UndoUndo0
setup up yr mc with preloader, and load yr image into it. for the next image duplicate the mc and load the image into etc etc
- vaporstouch0
so if i have something like
load_mc.loadMovie("img" +imageNum + ".jpg");
will i just have the preloader in frame 1 of load_mc?
- UndoUndo0
yep, and then set a unique listener assigned to the jpg to be loaded. when it hits onLoad stop the preloader
- vaporstouch0
thank you. could you give some more info on the listener and where it should reside? something like:
onLoad = function(success) {
if (success) {
trace (" loaded");
} else {
trace ("failed to load");
}
}
- imakedesign0
have you used the MovieClipLoader in AS.20 its superb. gives you great control.
- UndoUndo0
imakedesign is right. use flash help and put in 'MovieClipLoader ' it will show you how to use the listeners
:)