Hi guys, im having some trouble accessing a function from another class and I 
would like to know how its done.

In my project i have 2 FLAs 'gallery.fla' and 'main_site.fla', each of the FLAs 
has its own document class 'gallery.as' and 'main_site.as'. When compiled the 
second SWF(main_site) is loaded into the first SWF(gallery). 

In the same class that loads the SWF there is a number of other functions i 
want to access from buttons located within the loaded SWF (main_site).

The SWF is loaded using this code...

// CODE from within FUNCTION 
    var swfLoader:Loader = new Loader();
    var swfURL:URLRequest = new URLRequest(filename);
    swfLoader.load (swfURL);
    swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, 
swfLoadComplete);

// CODE from within 'swfLoadComplete' FUNCTION 
   addChild(ev.target.content);   
   var loader:LoaderInfo = LoaderInfo(ev.target);   
   loader.content.x = 0;
   loader.content.y = 0;

SJM
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to