Holy bageezaus!!! It no longer says undefined. No to just get these damn images 
to load correctly. Wow so I guess you need to give a scope to the Interval to 
help out. That's great! Thanks!

Corban Baxter      |      rich media designer      |      www.funimation.com


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Phelan
Sent: Thursday, February 02, 2006 5:45 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] scope of function... undefined?

Corban

Change your setInterval to this

loadImgInterval = setInterval(this,"loadImages", 2000,
imagesToGrab);

Jim

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Corban
Baxter
Sent: Thursday, February 02, 2006 6:16 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] scope of function... undefined?

Anyone? Sorry Jason I didn't mean to anger you. I have been looking at
this for almost 10hours now and I can't take it anymore!

//cb


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Corban
Baxter
Sent: Thursday, February 02, 2006 3:50 PM
To: [email protected]
Subject: [Flashcoders] scope of function... undefined?

Hey all this is kind of a repost but I have a weird problem... Ok I have
a function I am calling on the root timeline and when I trace(this)
inside of it I am getting a return of undefined. What would cause this?
Here is the function. 

[code]

function loadImages(imagesToGrab:Number) {
        if (imagesToGrab == 0) {
                //stop loading images
                clearInterval(loadImgInterval);
                trace("hitting the clear");
        } else {
                var randomPos:Number = random(imagesToGrab)+1;
                var rfcClip:MovieClip = rfcsArray[randomPos];
                var imgID:String = imgArray[randomPos];
                
                //delete from array to keep from running one more than
once
                rfcsArray.splice(randomPos, 1);
                imgArray.splice(randomPos, 1);
                
                //trying to decipher wtf is going on....
                trace("imgID: "+imgID); //returns layout5_set3_img10
                trace("rfcClip: "+rfcClip); //returns lay5_img10
                trace(this[rfcClip]); //returns undefined - WHY!
                trace(this); //returns undefined - WHY!
                
                //ALL ISSUES ARE OCCURING IN THIS LINE OF CODE FROM WHAT
I UNDERSTAND
                this[rfcClip].container.attachMovie(imgID, imgID,
this.getNextHighestDepth());
                
                
                imagesToGrab--;
                clearInterval(loadImgInterval);
                loadImgInterval = setInterval(loadImages, 2000,
imagesToGrab);
        }
        trace("imagesLeftToLoad: "+imagesToGrab);
        trace(" ");
}

[/code]

if you want to look at my FLA be my guest...
http://webdev.funimation.com/fun2004/coders/s3.zip


//cb


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to