Centering an external SWF in a SWF

honeyholz

New Member
Sorry if that sounds confusing but I'm trying to centre an external swf inside another one. For some reason the registration point is set to top left hand corner. I can't go changing the external file co-ordinates because Im using them elsewhere and they are central.
The code I'm using to load the movie is;

on (release) {
gotoAndStop (framenumber);
{
loadMovieNum ("movie.swf", 1);
}}

Any help would be appreciated I've had a look at a few forums but they seem to be all different and aren't working for me:confused:
 

thrive

New Member
Load the movie into a movie object instead of root. You can then position that movie object where you want it.
 

honeyholz

New Member
I've solved it! Firstly I created a movie with the registation point in the top left hand corner then I positioned the invisible movie slightly left from the other one and half way down. Then I added some code in a new key frame on a separate layer, I gave the buttons instance names as mentioned below e.g: home_button

var home_select = new Color (home_text);
var technology = new Color (technology_text);
var corporate = new Color (corporate_text);
var products_select = new Color (products_text);
var markets_select = new Color (markets_text);
var events_select = new Color (events_text);
var news_select = new Color (news_text);
var partners_select = new Color (partners_text);
var casestudies_select = new Color (casestudies_text);
var opportunities_select = new Color (opportunities_text);
var contactus_select = new Color (contactus_text);

//navigation code start
this.home_button.onPress= function ()
{loadMovie ("home.swf",sub_window);
home_select.setRGB(0xFFFFFF);
technology_select.setRGB(0x000000);
corporate_select.setRGB(0x000000);
products_select.setRGB(0x000000);
markets_select.setRGB(0x000000);
events_select.setRGB(0x000000);
news_select.setRGB(0x000000);
partners_select.setRGB(0x000000);
casestudies_select.setRGB(0x000000);
opportunities_select.setRGB(0x000000);
contact_select.setRGB(0x000000);
sitemap_select.setRGB(0x000000);
;}The only code on the button was on (release) {
gotoAndStop (frame number here where other movie has finished);
}

That last bit of code avoids the movie over lapping.
 
Top