all groups > flash actionscript > november 2004 >
You're in the

flash actionscript

group:

Control XY of a dynamic jpg


Control XY of a dynamic jpg davechuck
11/14/2004 5:57:51 PM
flash actionscript:
I am using the following script to load a dynamic jpg picture into my page.
Works great, BUT, where do I add the XY coordinates in this statement? I need
to control the pictures top left origin. Thanks
_root.createEmptyMovieClip('mc1',1); mc1.loadMovie('J4Fpic.jpg');
Re: Control XY of a dynamic jpg jolyon_russ
11/14/2004 9:55:11 PM
I tend to do it after the load movie.

The movieclip will have repositioned itself by the time the jpeg has loaded.

Hope this helps.


Jolyon

_root.createEmptyMovieClip("mc1",1);
mc1.loadMovie("J4Fpic.jpg");
mc1._x = your desired horizontal position
mc1._y = your desired verticle position
Re: Control XY of a dynamic jpg Laiverd.COM
11/14/2004 10:53:47 PM
_root.createEmptyMovieClip('mc1',1);
mc1._x = whatever;
mc1._y = whatever;
mc1.loadMovie('J4Fpic.jpg');

John

--
---------------------------------------------------------------------------------------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
---------------------------------------------------------------------------------------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
---------------------------------------------------------------------------------------

Re: Control XY of a dynamic jpg Rothrock
11/14/2004 11:32:54 PM
You may also need a preloader. The image will not load immediately so you will
need to wait. Especially for other properties like width and height. I know you
didn't specifically ask about those, but sometimes people want to do things
like center or scale a loaded image before they set the xy, and in that case
you have to wait until the whole thing is loaded. There are lots of posts here
about preloaders so check them out. Also if you are using MX04, then I
recommend the MovieClipLoader instead of loadMovie.
Re: Control XY of a dynamic jpg sroberts1
11/18/2004 2:03:41 AM
Re: Control XY of a dynamic jpg Rothrock
11/18/2004 3:05:13 AM
AddThis Social Bookmark Button