I'm a newbie to flash (being in i.t. since 1989). I'm using the following method to load an external swf file. The method is called from the main movies constructors
public function InitLoader(baseFile:String, skyFile:String = "") : void
if(skyFile.length > 0)
skyLoader.load( new URLRequest( skyFile ) );
addChild( skyLoader );
imLoader.load( new URLRequest(baseFile) );
addChild( imLoader );
But the debug output shows these files are being loaded over and over again until the program crashes. What do I do? What did I do wrong?
Well you have completely wrong code.
That uncompleted code you have attempted is for loading swf like a 'preloader'.
To import outside .as files you use:
^^ I think that is what you are after but i added all the possibilities in also just incase!
If you are using a .as class file use this to import:
var myobject:classname = new classname();
Hope it helped
Unless you have provided some other information to McbainGames11 that no one else is privy to, I would ignore that response as what you have shown has no resemblance to what is discussed.
It is true that the function should only load once, but it is more likely a problem of that function being called more than once. So try looking at wherever that function gets called and trace to see if it is being called mutliple times.