Application.application will give you a reference to the top-level document. I believe parentApplication will also work in this case. I believe parentDocument will NOT work.
Tracy -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ernesto Casasín Sent: Thursday, May 08, 2008 12:35 PM To: [email protected] Subject: [flexcoders] flash -> flex communication Hi all, my first posting here, glad to meet you. I'd appreciate any hint on the following problem I've got. I have an embedded swf into a flex app. From the embedded swf, I want to make calls to the flex container, but until now, any atempt has been useless. my swf is instantiated this way <mx:SWFLoader source="assets/flash/mapa_galicia.swf" id="mapaSWF" complete="onMapaSWFCompleted(event);" /> <mx:Script> <![CDATA[ private var loadedSWFMainTimeline:*; private var mapa_ins:MovieClip; private function onMapaSWFCompleted(event:Event):void { loadedSWFMainTimeline = mapaSWF.content; mapa_ins = loadedSWFMainTimeline.mapa_ins; // mapa_ins is a movieclip instance within the swf file. mapa_ins.addEventListener(MouseEvent.CLICK, function (e:MouseEvent):void{gFlexProvincia = mapa_ins.gProvincia}); } ]]> </mx:Script> I have access to the swf methods and variables from flex, but as I've said, not the other way round. I've tryed mapa_ins.parent and the like, but no way any help? ------------------------------ Ernesto Casasín Abaco Digital, SL José Pardo Sastrón, 7, 1 50001 Zaragoza Tel: 34 976 29 79 80 Fax: 34 976 20 48 50 ------------------------------------ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links

