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?
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.
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) {
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.
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
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.