Loadmovienum and change _x & _y

Hey people,

This might be a dumb question, but I’ve never gotten it to work, so I thought i’d ask:

on (rollOver) {
buttons._y = -115;
buttons.gotoAndPlay(2);
}
on (rollOut) {
buttons.gotoAndPlay(9);
}
on (press) {
loadMovieNum (“web-1.swf”, 10);}

I have this code on a button of mine for a site I’m making. When I’m using the load MovieNum to import another .swf into the main movie, is there any way I can change the _x and _y of where that .swf actually gets placed? Can I give the imported .swf a name or some reference so I can just move it to the appropriate place?

Any help would be appreciated,

Uth :nerd:

Using the method loadMovieNum(); you cannot change the possition of the movie in level#. There are two solutions to this.

A) you can use loadMovie(); to load the swf into a target movie clip in any level. In this case you can move the clip that is holding the swf and it will move all of the contents.

ie
_root.myHolderClip._y++;

B) you can place anything that you need to move, inside a movie clip in the loaded swf. In this case you call out to the level, and then the clip name to move it.

ie
_level2.myMoverClip._x=300;

David,

Thanks for responding. I’ve tried setting up what you suggested, and I’ve gotten it partially working. When I push the button, every second time it’ll adjust the movie clip “port1” inside my web-1.swf. Here’s what i’ve changed:

on (rollOver) {
buttons._y = -115;
buttons.gotoAndPlay(2);
}
on (rollOut) {
buttons.gotoAndPlay(9);
}
on (release) {

holder.gotoAndPlay(2);
_level5.port1._x=550;
_level5.port1._y=300;

}

inside my “holder” clip on the second frame (the first is just a stop action), here’s what I have:

loadMovie (“web-1.swf”, 5);
stop();

I also tried the other way you mentioned, but I had a lot more trouble with that than this. Anything that you can see wrong with that setup?

Thanks for the help,

Uth

boy… just works sometimes huh?

That is tough to understand what’s going on…

the only thing that I can suggest immediately is in this:

loadMovie (“web-1.swf”, 5);
stop();

First off, you have loadMovie, which is a method for loading things into instances of movie clips, not levels, so the syntax here is a little screwy. Should be loadMovieNum();
…and I don’t know for sure if it’s a problem, but I would suggest changing that swf’s file name. I’m not sure if actionscript will understand, without error, a name with a minus symbol in it.

Hey,

Ok I’ve given it a few more tries (using the loadMovieNum instead of loadMovie, and it now loads web1.swf instead of web-1.swf). Still having the same problem unfortunately :confused:

I know you’re pretty busy, but if have the time, could you possibly look over the files themselves and see what it is that I’m messing up? (I’ll send them privately if you’re game)

If not, no biggie. I can always work around it another way.

thanks again,

Uth :nerd:

If you have Flash 5.0 files I’ll look at them.

upuaut@centerspin.com

Ok, they’re sent off to the email you gave. thanks again for looking at them.

Uth :nerd:

Hey there,

Just curious if you got a chance to check out those files yet. If not, no biggie.

Danke,

Uth

hi,

it seems interesting becoz i got the same problem… i only have the swf not the fla so i cannot edit the fla…

any solution to the positioning the swf files??

tq