View Full Version : Loader Bug
Dazzer
June 25th, 2007, 10:34 AM
I cannot for the life of me imagine why I'm having this problem.
Basically I have a loop. Loop goes through and creates a Loader, eventListener, then loads a file.
When I load only 1, it works fine.
Anything more than 1, for some ODD reason, it "dies" or something, and it goes back to the initialise method of the Document Class. Then it goes through again and it just loops and loops and loops.
I definitely narrowed down the problem to that 1 line
ActionScript Code:
temp.load(requestURL);
commenting it out is fine.
Any ideas?
flesh
June 25th, 2007, 11:17 AM
I cannot for the life of me imagine why I'm having this problem.
Basically I have a loop. Loop goes through and creates a Loader, eventListener, then loads a file.
When I load only 1, it works fine.
Anything more than 1, for some ODD reason, it "dies" or something, and it goes back to the initialise method of the Document Class. Then it goes through again and it just loops and loops and loops.
I definitely narrowed down the problem to that 1 line
ActionScript Code:
</p>
<p>temp.load(requestURL);</p>
<p>
commenting it out is fine.
Any ideas?
Very little to work on here. Might be an idea to show the whole script. ?
Dazzer
June 25th, 2007, 11:26 AM
I don't really want to give the whole script. Because it is HUGE. And I've already tried a different method (and I didn't back up) lol
Commenting is the exact line I put in the actionscript.
Basically something like this.
function documentClass():void
{
trace("HI");
stop();
}
function something():void
{
for (var i:int = 0; i<paths.length(); i++)
{
var loader:Loader = new Loader();
loader.addEventListener(Event.COMPLETE, onLoadComplete, false, 0 ,false);
loader.load(new URLRequest(paths[i]));
}
}
Now if I were to NOT load (comment out the last line) i do not get that problem. It'll trace HI once.
If I were to load, and it were to load more than 1, it traces HI again and again and again and again and again. even with the stop();
Dazzer
June 25th, 2007, 11:51 AM
BAHHH
I am a jackarse
I accidentally overwrote one of my external swfs with the main.swf. Meaning that it would load itself... thus it would keep repeating.
LOL I'm so stupid...
Carry on people nothing to see here... >.<
dthought
June 26th, 2007, 01:15 AM
So, not a bug in Flash, but a bug in your own code... tsk tsk tsk *shakes head* ;)
TheCanadian
June 26th, 2007, 01:33 AM
It's almost never a bug with Flash, but I don't think Dazzer was implying that it was.
Dazzer
June 26th, 2007, 01:56 AM
Nah I really thought it was a weird bug that didn't allow more than 2 loaders working at the same time.
And wasn't really an error with code. I think I accidentally exported my main swf onto the external file somewhere. I figured it out when I rewrote a small portion into a separate project with the same external files. me bad hehehehe
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.