What Is Wrong With My Script?

HELLO ALL!

I’ve been working on my photogallery and i have been modifying it in order to preload the jpegs(images) one at a time. But, the problem is, only one clip is gonna appear. There is really something wrong with my script most specifically in my preloading section. :frowning: Can somebody help me?

Heres the code:


this.smls = 12.5;
targ_clip.setMask(mb);
i = 0;
function makeClips() {
	var m;
	m = targ_clip.attachMovie("sqr", "s"+i, i);
	m._x = 15;
	m._y = 60*i+10;
	m._xscale = m._yscale=this.smls;
	m.createEmptyMovieClip("holder", 0);
	m.holder.loadMovie(this.photoArray*);
	//preloading section
	this.onEnterFrame = function() {
		if (m.holder.getBytesLoaded == m.holder.getBytesTotal) {
			i++;
			trace(i);
			redo;
			this.onEnterFrame = undefined;
			
		}
	};
}
redo = makeClips();

You keep giving your new clips the same name - “holder”. Try this:

m.createEmptyMovieClip("holder"+i, i);

*Originally posted by Phat7 *
**You keep giving your new clips the same name - “holder”. Try this:

m.createEmptyMovieClip("holder"+i, i);

**

now. no images appears. :frowning: :*( waahh!!!

post your fla.

ah!.. think i got it now… :slight_smile: thanks Phat! :slight_smile:

What was it?

i changed some code: and u know… if forgot putting open and close parentheses in my preloading section… :slight_smile:

goes something like this…


...
 //preloading section
        this.onEnterFrame = function() {
                if (m.holder.getBytesLoaded() == m.holder.getBytesTotal()) {
                        i++;
                        trace(i);
                        redo;
                        this.onEnterFrame = undefined;
                        
                }
......