I’m Loading an image into a MC based on an XML file. I’m setting the initial alpha to 0, loading the image, then setting the alpha to 100 once I see that it is fully loaded. The problem is that I want the image to be resized, which is not working. Every time I check the size of the MC once the image is loaded I get 0x0. Here preload code.
function preload(num) {
eval("image"+num).loadMovie(url[num],1);
eval("image"+num).onEnterFrame = function() {
var bytesloaded = this.getBytesLoaded();
var bytestotal = this.getBytesTotal();
var percent = Math.floor(bytesloaded/bytestotal*100);
trace(this._width);
if(percent >= 100 && this._width > 0 && this._height > 0){
trace(this._width);
this._alpha = 100;
delete this.onEnterFrame;
}
};
};