This content has been marked as final. Show 9 replies
how do you do it with the image loaded?
create a new file , in frame # 1 put this action then F5 in frame # 3 :
// Creates a movie clip to hold the container.
// Loads an image into image_mc.
image_mc._x = 75;
image_mc._y = 60;
and in new layer click F6 on frame # 3 and put this action :
trace("W: " + image_mc._width + " H: " + image_mc._height);
errr i just get the value 0 if i try this on a loader component... should I ...put the image in a blinkmovie clip save the image size then, load it into the loader then rescale the loader according to the height and width?
it still gives me the value of 0..
i think that u have a slow connection , so please try these options ,
replace the image url by a image in ur hard disk ("images/test.jpg") or ("test.jpg")
instead frame 3 make it 20 if option one dosent work
you must use preloader code or the onLoadInit() method of a moviecliploader listener to ensure your image has completely loaded before trying to access its _width and _height.
using different frames for code is very poor coding for a number of reasons.
thanks kglad , u r true