Again another solution i tried but this too does not work! Thanks SJM ----- Original Message ----- From: Kenneth Kawamoto To: Flash Coders List Sent: Thursday, August 14, 2008 1:36 PM Subject: Re: [Flashcoders] AS3 accessing functions from other classes
You should be able to do access the parent by using, "parent". Kenneth Kawamoto http://www.materiaprima.co.uk/ SJM - Flash wrote: > 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 _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

