For .jpg, check _height instead of getBytesLoaded()
While checking whether any .jpg is loaded or not, it's good to check _height of the container mc instead of getBytesLoaded().
Because, though .jpg loaded fully, it may not be rendered on the screen. So if you want to get the the properties like height/width immediatly after loading, you may get 0.
mcContainer.load("sample.jpg");
this.onEnterFrame = function(){
var val = mcContainer._height;
if(val > 0){
delete this.onEnterFrame;
foo();
}
}
Be careful while using above logic to check .swf loading, since, if the first frame of the .swf being loaded is blank with stop() written on it then, mcContainer._height always written 0 & it will become a endless loop.

2 Comments:
I hope you get the way this works, as it is really useful all the time. And of course, onEnterFrame is not the only handler. You can also use:
onData
onDragOut
onDragOver
----------------
Robosoft Company Website
By
Anonymous, at 11:45 PM
I read your post and it is really good , keep writing more
Buy Weed Seeds Online
Buy A-796,260 Online
Buy Phenethylamine Psychedelics online
Buy DMT Dimethyltryptamine Online
Buy 5-methoxy DALT online
Cannabis Oil For Sale
Buy enzodiazepines online you can as well text/whatsapp +1(646)883-3072 , Telegram: primenature or email:primepharma0@gmail.com for more details.
Buy Fentanyl powder Online
Buy TH-PVP Powder Online
Order Oxycodone Morphine Online
Buy A-PVP Online
Buy Crystal Meth Online
Buy Acetyl Fentanyl Powder Online
Buy Carfentanil Online
Buy 4-MMC Online
BUY AMPHETAMINE ONLINE
CBD Isolate Powder 99%+
Buy Ephedra Powder Online
By
Admin, at 3:26 PM
Post a Comment
<< Home