Deril
November 17, 2002, 6:40pm
1
Hello,
I have a problem and thought maybe you can help me.
hare is the line I use to load image to movie clip IMG:
IMG.loadMovie("photoz/"+LPIC[DAIKTYNAS[preinuse]**]);
ignore the details…
naw I have to get img size:
_root.imgheight = ????
_root.imgwidth = ????
DERIL
system
November 17, 2002, 9:18pm
2
I think
imgwidth =IMG.width;
imgheight = IMG.height;
img+width/height are just some variables that’s values are the width and height…
should be as simple as that…
system
November 17, 2002, 10:51pm
3
I tryed it, flash acts as there is nothing loaded.
:<
system
November 18, 2002, 1:54am
4
Try
imgwidth =IMG._width;
imgheight = IMG._height;
The _ makes all the difference.
Also, an images size registers as 0x0 until it is fully loaded.
system
December 3, 2002, 4:26pm
5
hm… I found my mistake.
my code was…
IMG.loadMovie(“photoz/”+LPIC[DAIKTYNAS[preinuse]**]);]
_root.imgheight = _root.IMG._width;
_root.imgwidth = _root.IMG._height;
but _width returns empty, becos image is not loaded jet… you have to wait till it will load and then detect size…
thanks for help.
GL.
system
December 3, 2002, 5:48pm
6
Oh ok, so I stated it loaded 0x0 instead of empty… oops, sorry :-\
Well glad you solved it