So i got this loadmovie problem:
I want to load an JPG image into a movieclip (mov_cover) when the flashmovie starts Well that's the easy part but i need it to center in that movieclip. Those JPG images are never the same size.
Shouldn't be that hard but it driving me mad.
I approach this by creating a new clip (inside mov_cover), loading the image into that, then when complete, placing the clip at minus half its width and height.
So if the loaded image is, say 300 x 200, you set the container clip to x,y of -150, -100
Thanks, but i'm already at this stage. The main problem is the different sizes of images. I need to somehow get the width and height of the image and pass that through to the movieclip.
you can get the width and height of a JPG you've loaded, but only after it's fully loaded.
The thing to do I think is to create a holder clip that is invisible or off screen, in that create another holder into which you do loadmovie.
Check for when the JPG has loaded, then you can get the width and height, do your adjustments, and then make the main container visible again.
Have a look at this thread for code and tips: http://www.actionscript.org/forums/showthread.php3?t=57444
if(move_cover._width >10) { move_cover._x = move_cover._width/2; move_cover._y = move_cover._height/2; }