Here’s my code:
onClipEvent (load) {
trace("I'm loaded!");
trace("jpg's width = "+this._width);
if (this._width == 0) {
trace("0 width - Wrong jpg path?");
} else {
//Image loaded OK
this._width = 216;
this._height = 162;
}
}
I have this code on a MovieClip that I need to load some oversized images to. (The images are 284x216, and I need them 216x162 for this swf).
This code works fine at resizeing the image after it load successfully. My problem is rather strange. When I do anything to add a preloader to the swf, either adding an extra scene to the swf or adding an extra frame in the root timeline - the images that load in look a little distorted(The best way that I could describe it is if you open an image in photoshop at 100% then scale it down to like 66% and look at it - that’s what’s happening). When the movie has no preloader at all - it works great. Has anyone ever experienced this - or has anyone done an imageloader like this that needs to resize the images and had it work flawlessly?