Skip to main content
March 24, 2011
Question

Positioning External Load movies

  • March 24, 2011
  • 1 reply
  • 599 views

Hi,

I have made a flash player that loads in two external flash movies this is all now workign fine with a little extra help, however the problem i have now is that when the movies load in they both show in different places, for example the external movie called new_products loads perfectly in places, for example one of the movies loads into place where i want it to but the second loads in to position starting at the top left.

When i add x, y for the loader it affects them both, but they still originate from differnt start positions.

The loader code is below:

var fl_Loader:Loader = new Loader();
addChild(fl_Loader);

fl_Loader.x=10; // use your X position here
fl_Loader.y=10; // use your Y position here


new_products.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF);
special_offers.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF);

function fl_ClickToLoadUnloadSWF(event:MouseEvent):void
{
    var url:String = event.currentTarget.name+".swf";
    fl_Loader.load(new URLRequest(url));
}

And the link to see the flash is here:  http://www.pestcontrolonline.com/main_flash/main_flash.html

Any suggestions would be much appreciated

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
March 24, 2011

position your loader according to which swf is loaded.

March 24, 2011

sorry i am very new to flash how would i do that?

kglad
Community Expert
Community Expert
March 24, 2011

the following:

fl_Loader.x=10; // use your X position here
fl_Loader.y=10; // use your Y position here

assigns your loader to 10,10.

if you want it elsewhere, use numbers different from 10 and 10.