|
-
Ronze
[RESOLVED] [MX04] getting size of external pic?
Hey
In a loop, I am creating a bunch of empty movieclips and loading jpegs into them. I want to line them up side by side, but the problem is, that some of the pictures is vertical and some horisontal... So I can't just give a specific number to _x the movieclips. Is there some way I can detect how wide my loaded pictures are, or what can I do?
- Rune
-
Consider u r loading the images into movieclip img_holder then u can get the width and height of the images from xWidth & yHeight. Or u can change the width and height to a limit here and u can give the _x directly in the loop.
code:
this.onEnterFrame = function()
{
if (img_holder._width>0)
{
xWidth = img_holder._width;
yHeight = img_holder._height;
delete this.onEnterFrame;
}
}
Regards,
Mike.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|