Loadmovie

Hi,

If I am going to load a new movie onto existing movie by using “loadmovie” command. Is it possible to arrange the location of the loaded movie (x,y coordinates) by using action script?

Thank you.

Alphaville

Yes

yeah you can use target, however i just lay out my movie with the proper x, and y coordinates and save it like that. then when i load my new movie, everything is where it is supposed to be

Thanks for replies,

But my problem is existing movie has a larger window size than loaded one. So I need to load it into a location. I managed it by using loadtarget command. But i am not good at it and because I have many files I confuse with that. So I prefer to use “loadmovie” into levels.

How can I put the loaded movie to a specific location and a level?

Alphaville

this is what i do, where ever you want the content to show up, meaning your layout of your second swf, put in your index, just to align. when everything looks ok, cut and paste it in your new .swf

then you can load it like this

[AS]
button1.onRelease = function(){
loadMovieNum(“yourmovie.swf”,1); // 1 is the level
unloadMovieNum(2);
}

button2.onRelease = function(){
loadMovieNum(“anotherMovie.swf”,2);
unloadMovieNum(1);
}

[/AS]

get it?

Hmm … I read your question apart from everything else, and what I’d suggest is:

[AS]
_root.holder._x = 53;
_root.holder._y = 30;
_root.holder.loadMovie(“yourmovie.swf”);
[/AS]

Of course, 53 and 30 are dummy numbers, replace them by the x and y position of where you want your movieclip to be located.

*Originally posted by Voetsjoeba *
**Hmm … I read your question apart from everything else, and what I’d suggest is:

[AS]
_root.holder._x = 53;
_root.holder._y = 30;
_root.holder.loadMovie(“yourmovie.swf”);
[/AS]

Of course, 53 and 30 are dummy numbers, replace them by the x and y position of where you want your movieclip to be located. **

that would be your best solution

thanks for all replies,

I managed to load into location. Related to this question I would like to learn that, is it possible to change the origin of the main movie. So when I load a new movie, it can go to according to a new origin. I attached an image to make my question understanable. I wanna move the origin (0,0) to a red point.

Is it possibe?

Alphaville

_root.holder._x = 53;
_root.holder._y = 30;
_root.holder.loadMovie(“yourmovie.swf”);

then do

_root.holder._x = _root.holder._x+50;
_root.holder._y = _root.holder._y;

oww, thanks

I have a last question, sorry for many questions but your comments help me a lot,

Is it possible to load a new movie into a center of the main movie directly by a specific command?

I attached an image to expakin clearly. The gray color is a main movie (level 1)and the red one is loaded movie (level 2). (their widhts are same size)

Alphaville