Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

move nested movie over 50 px

Status
Not open for further replies.

2cxc

Programmer
Aug 29, 2003
245
CA
I have a main.swf that has a container MC on stage with this action in the first frame:
loadMovieNum("Main_map.swf", 3);

Everything loads but I would like Main_map.swf to be over to the left about 50px. I tried to move the container clip over but it did not change the Main_map.swf position when loaded. How can it be moved over 50px without moving it over in the Main_map.fla ?

thanks
 
I've been playing around with the setProperty, even though the script has no errors i can't seem to get the proper syntax to move the loadMovie. This is what i have so far:

setProperty (_root[loadMovieNum("Main_map.swf", 3)], _x, 60);
 
With that line of code, you're not loading this external movie in a container clip but on level 3. If you want to load it in an empty container clip, create it and drag it on stage, and give it an instance name, let's say "container_mc". Then use the following to load your movie into it...

loadMovie("Main_map.swf", "_root.container_mc");

Or...

_root.container_mc.loadMovie("Main_map.swf");

The external movie should load aligned to the top-left corner of the container clip. Simply set the x & y coordinates of your container clip (in it's properties) accordingly.

If you still want to load your movie on a level, then it can't be positioned until it's fully loaded and certainely not on the same frame's or button's script that holds the loadMovieNum action itself. The only way to pre-position a movie loaded on another level, is to do so in the "to be loaded" itself, by adding the following on it's first frame...

this._x = 150; // offset from top-left corner...
this._y = 225; // offset from top-left corner...
 
You mentioned to do so in the "to be loaded" itself... can you explain this further?
 
In your "Main_map.fla" (By the way, you shouldn't use caps, that'll et you in trouble!), just put those settings on the first frame. Of course you'll have to play with those numbers, to get it just right for you... Remember that those are offset values from the top-left corner of your host(main) movie. They can even be negative if need be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top