-
loadMovie() / jpg / adjusting MC size
hey folks,
i'm making a flash photo gallery, displaying 2 dynamically loaded jpgs (via loadMovie(filename+".jpg")) at a time next to each other.
i'm loading these jpgs into 2 different MCs created by attachMovie();
so far so good...
problem is: jpgs have different sizes which i do not know in advance. i can't seem to find out the size of the loaded pics; getBounds() only returns the size of the MC i have loaded 'em into which is no use for me since it is not the size of the actual jpg.
i would like to resize the respective MC by getting the actual size of the pic, but i can't even resize the MCs at all after the jpgs have loaded.
any ideas ?
-
When you load a jpg image into a movieclip that movieclip will take the dimenssion of the image. But not until a the image has loaded. until then i belive the dimension is 0, 0.
/Mirandir
-
yeah well, that's what i thought. but it turns out to be like this:
when i attach (w/ attachMovie()) an empty clip "photoMC" (dimensions 0,0 of course since it's empty) to the stage and then load a jpg into photoMC and THEN use getBounds() on photoMC i get really absurd numbers, although the jpg is only, say, 350x350.
how do i get to the jpgs actual size then ? is getBounds() the wrong way to do it ?
-
The mc's _width & _height?
-
i was horsing around with getBounds() all the time....but oh man, life can be so simple sometimes.
ok, _width works fine.
thank you guys for helping...
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
|