Loading and "not" loading

I’ve been experiencing this issue for some time and was hoping someone could shed some light…

I am loading external swfs, none too large 300-500k each, and would like to have a pre-loader appear while the files are loading BUT… if they are already cached… to NOT appear.

I’ve been using a pretty low-fi approach. My pre-loader has a “buffer” of about 20 frames before it transitions to “LOADING…” If the swf has not loaded it will run the 20 frames and then show “LOADING”. But if the file is in the cache, it will simply cancel the onEnterFrame and send the pre-loader back to frame 1.

I feel like there must be a better, more robust way to handle this conditional.

Here’s the code I’ve been using:
scope[“holder”+ln].onEnterFrame = function(){
bl = scope[“holder”+ln].clip.getBytesLoaded();
bt = scope[“holder”+ln].clip.getBytesTotal();
if(bl >= bt && bl > 12){
delete scope[“holder”+ln].onEnterFrame;