He explain the following (extract from Colin Moocks ASDG v2)
"Notice that in our preloader examples we checked whether _framesloaded > 0 in addition to whether _framesloaded == _totalframes. This is necessary because when a movie is unloaded from a clip, that clip has a _totalframes of 0. Hence, if _framesloaded is 0 (as it might be on a very slow connection), the comparison _framesloaded == _totalframes can return true even when no frames have yet loaded. Our check prevents the movie from skipping ahead before the appopriate content had loaded. This precaution is not necessary with preloaders placed on the main timeline of loading .swf filesm because their _totalframes property is never 0.
Now does this mean that due to the preloader being created in a empty movie clip and by removing it at the end of the code, the _totalframes of it would return 0. So when next time the preloader is used on slow connection it would just thinks that it equals total frames.
So if you were to check if _framesloaded == _totalframes then it would return true because 0 frames loaded would be equal to 0 total frames.
So what Moock is trying to do here is check if there are MORE than 0 frames in the timeline that was loaded AND if the amount of frames loaded is equal to the total amount of the frames in the timeline. And that way Flash won’t get tricked by the empty clip having 0 _totalframes.
Does that help?
(i know i know, this is my first preloader question since retirement of preloader questions, but given the situation I don’t find it is a preloader question, but rather more of a “why is it like this” question)
ok, reading it again. Wouldnt the preloader be looking for the _framesloaded and _totalframes of a content timeline (or external targeted swf timeline) not the preloader’s movieclip timeline. ??
based on
This precaution is not necessary with preloaders placed on the main timeline of loading .swf filesm because their _totalframes property is never 0
does it really matter if the preloaders movieclip equals 0 , since we are looking for the total frames of the _parent timeline not the preloades timeline. wouldnt the preloaders movieclip just run a loop?
:: sorry if these are stupid question, this is just got me a little bit puzzled.
when you load to an empty movie clip, the contents of that empty movie clip become the contents of your movie. And you can even target the contents of your movie by targeting the clip you loaded to. So loading a movie to an empty clip is essentially just dynamically loading a timeline into a movie clip that has no timeline.
LOL, you can never learn too much, but you can try to learn too much at once.
I am currently at that problem. I am still learning AS, while still learning Javascript, and just beginning to tackle PHP/mySQL and I am going to be starting Java AND proce55ing soon :hangover: