not weird in a sense i have never seen it, but after hours of debugging i really dont understand why its happening…
here is my setup (needed for understanding the problem):
i am placing thumbs on the stage in a grid and i have few categories of thumbs, by default first category loads, and then you can choose between other categories.
first of all, error doesnt happen if i dont simulate download
second, error doesnt happen if i simulate download and wait for all the thumbs to load before skippping to next category
error only happens if i simulate download and while current category (any of them) is loading, i skip to some other category[FONT=monospace]
(call [/FONT]function clickCategory(e:MouseEvent):void) (line 104)[FONT=monospace].
[/FONT]but the error doesnt happen there (during category switch), thumbs start loading just fine, it always happens after last thumb loads.
[FONT=monospace]
and in either case (error or not) all the thumbs load just fine, from first to last one, in sequential matter.
[/FONT][FONT=monospace]-----
[/FONT]here is the code: http://pastie.org/485074
yes, i know, its long, but the error comes from this function:
function thumb_Complete(e:Event):void (line 76)
i have 2 things here: adding the thumb and removing the movieclip preloader (which is a sppining animation)
in this case, removing preloader on line 91 causes an error, but preloader is there, i can trace it just fine (and like i said, it works (no error) when i dont simulate download, or wait for all the thumbs to load before switching to next category, so the code must be right)
i dont get it i have been debugging this for hours and i am completely out of clue why is that happening…