-
loadMovie, image, resize
hello folks,
here's what I want to do. Load in an image, then, once it's loaded resize it to a certain width and height in case it exceeds the maximum size.
I did the obvious, load in the image, then in the next frame :
if(imageholder._width > 328){
imageholder._width = 328
}
if(imageholder._height > 328){
imageholder._height = 328
}
nothing happens, when I trace those two values, they come out as zero, does the image have yet another instance I know nothing about and cannot influence, I DON'T think so. So that's it. I need YOUR help to move on in this Flash Remoting project of mine...
V
-
surfe3d a bit. and found an answer, the following code had to be attached to the placeholder instance:
onClipEvent(data) {
a=320;
b=320;
c=b/a;
x=this._width;
y=this._height;
if (x>0 and y>0) {
if (y>=x) {
z=b/y;
} else {
z=a/x;
}
if (z<=(y/x)) {
this._xscale*=z;
this._yscale*=z;
}
}
}
-
have you used another image software? NET Image SDK image loading options allows users to load different image file types, such as PNG, BMP, GIF, JPG, and many more.