Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-16-2004, 08:38 PM   #1
teamhonda22
Registered User
 
Join Date: Dec 2003
Location: Kansas
Posts: 71
Default Pictures not loading

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 (
0i<=12i++) 
        {
            
//thumb = "thumb"
            
_root.junior["thumb"+i].loadMovie("Images/Junior High/2004/thumbs/July/July 23, 2004/thumb"+i+".jpg");
            
_root.junior["thumb"+i].getBytesLoaded();
            
_root.junior["thumb"+i].getBytesTotal();
            
trace("L = "+L);
            
trace("T = "+T);
            if (
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 (
1i<=12i++) {
            
_root.junior["thumb"+i].onRelease = function() {
                
num this._name.substr(-1this._name.length);
                
//num = i;
                
trace(num);
                
_root.junior.picture.loadMovie("Images/Junior High/2004/pictures/July/July 23, 2004/image"+num+".jpg");
            };
        }
    }
}; 

Last edited by CyanBlue; 08-17-2004 at 02:09 PM. Reason: PHP tag is applied
teamhonda22 is offline   Reply With Quote
Old 08-16-2004, 09:00 PM   #2
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

...
num = this._name.substr(-1, this._name.length);
//num = i;
trace(num);
...
Do you ever get 10 & 11 traced?
oldnewbie is offline   Reply With Quote
Old 08-16-2004, 09:04 PM   #3
teamhonda22
Registered User
 
Join Date: Dec 2003
Location: Kansas
Posts: 71
Default

nope
teamhonda22 is offline   Reply With Quote
Old 08-16-2004, 09:06 PM   #4
teamhonda22
Registered User
 
Join Date: Dec 2003
Location: Kansas
Posts: 71
Default

it goes back to 0 for 10 and 1 for 11
teamhonda22 is offline   Reply With Quote
Old 08-16-2004, 10:01 PM   #5
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

what does trace(this._name); output?
and why do you strart your substr at -1 (the last character of the string)?
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 08-16-2004, 11:41 PM   #6
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

Isn't that what I was hinting on?
oldnewbie is offline   Reply With Quote
Old 08-17-2004, 01:59 PM   #7
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

maybe.... i'm a bit slow oldnewbie, so you'll need to be more explicit for me to pick up on your hints. hehheh.
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:03 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.