swfloader.content.application.sayHello, but after the "complete" event.
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of vrempp Sent: Friday, November 30, 2007 8:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Calling a method defined in a script block from an swf... how? Hi evrybody, I'm wondering how to call the sayHello() method from an inbeded swf. Does anyone have a solution for this? ( The goal is to call the sayHello method (defined in the mxml) from the swf compiled with flash cs3.) <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> <![CDATA[ public function sayHello(toWho:String):void { Alert.show("Hello "+toWho); } ]]> </mx:Script> <mx:SWFLoader source="../assets/myCS3compiledswf.swf"/> </mx:Application> thanks, Vincent