The load movie script in mx

firstly hello. um my ? is this. first i dont have a problem with implementing the loadmovie code in my site. im building a website and ive kept the sites’ size as low as possible but ive just been told that i have to add a gallery. what i did was that i made the gallery section as a seperate swf.(as a separate movie) now my problem is that when the loadmovie script is called, the movie loads through fine but it doesnt end up where i want it to. i want it on the center and it comes out like in the top left. now ive tried the x_xposition/ y_pos. under the set property but what i want to know is where should i input this line of code to, on a frame, on a movie clip, or on the actual sites’ swf or on the separate gallery swf.

hope this isnt too confusing and thank you all.

aku

You can try something lostinbeta taught me that worked for me:

on (release) {
	_root.containerMC.loadMovie("external.swf");
	_root.containerMC._x = Stage.width/2;
	_root.containerMC._y = Stage.height/2;
}

Hope it works for you too. =)

so where would i put this line of code. on the main site timeline or on the sep swf timeline???

sorry to bother but im anxious. lol

The above script that I posted is applied to a button or movieclip if that’s what you’re using to load the movie in, but if you want to place it on a certain frame then just remove the onrelease so that it will look like this:

    _root.containerMC.loadMovie("external.swf");
    _root.containerMC._x = Stage.width/2;
    _root.containerMC._y = Stage.height/2;

aight man, um i think im missing something. um, whats container mc and all that and do i have to change any code on it , and more importantly, like you said i want to add it to a frame but do i add it on the main sites swf or the side swf

im sorry but im now understanding all of it. thanks for helping out

ContainerMC is the movieclip you’re gonna load the external swf into, I just used “containerMC” as an example, you can put whatever instance name you used. As for the code, if you’re gonna place it on the frame then it would be on the main movie since you’re loading the external swf into the main swf. I hope that clears it up a bit more.

now its working but now its on the bott right hand side. lol, one ? is the coding going to go on the movie frame or the main timeline frame???

and again thanks.