I am making a picture page with 12 thumbs. Then when you click on one of the thumbs the larger version of the thumb is suppose to load. The problem is the 10th picture will not load. It wants to load picture 0.
Here's the code:
PHP Code:
_root.junior.createEmptyMovieClip("loader", 500);
_root.junior.loader.onEnterFrame = function()
{
if (!this.done)
{
for (i = 0; i<=12; i++)
{
//thumb = "thumb"
_root.junior["thumb"+i].loadMovie("Images/Junior High/2004/thumbs/July/July 23, 2004/thumb"+i+".jpg");
L = _root.junior["thumb"+i].getBytesLoaded();
T = _root.junior["thumb"+i].getBytesTotal();
trace("L = "+L);
trace("T = "+T);
if (L>4 && L == T) {
this.done = true;
//thumbsloaded = true;
}
}
} else
{
thumbsloaded = true;
this.removeMovieClip();
}
}
_root.junior.createEmptyMovieClip("loader2", 600);
_root.junior.loader2.onEnterFrame = function() {
if(_root.junior.thumbsloaded) {
for (i = 1; i<=12; i++) {
_root.junior["thumb"+i].onRelease = function() {
num = this._name.substr(-1, this._name.length);
//num = i;
trace(num);
_root.junior.picture.loadMovie("Images/Junior High/2004/pictures/July/July 23, 2004/image"+num+".jpg");
};
}
}
};