Can you paste a snippet of your LocalConnection code in the Flash SWF?

----- Original Message ----- 
From: "flexnewbie06" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, July 26, 2006 1:02 PM
Subject: [flexcoders] Local Connection


I think I am going to go crazy over this.  I have tried this a few 
different ways and always ending with the same result...not working.

I have 2 swf's loaded in my app with SWFLoader. They use local 
connection to talk to each other.  If i run app with swfloader with 
no source and then dynamically set the swf source when something 
happens in the app, local connection doesn't work.  If i load the swf 
in design the local connection works fine. For example Code 1 doesn't 
work, Code 2 does...If you can lend a hand I would REALLY appreciate 
it.

Jenn

****************Code 1*****************
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute">
<mx:Script>
<![CDATA[ 
public function load():void {
mainswf.source = "file.swf";
}
]]>
</mx:Script>
<mx:Panel x="25" y="10" width="528" height="383" layout="absolute">
<mx:SWFLoader id="mainswf" x="10" y="10" width="467" height="271"/>
<mx:ApplicationControlBar x="10" y="0" width="539" height="60">
<mx:SWFLoader id="menu" source="menu.swf" width="499" height="58"/>
</mx:ApplicationControlBar>
</mx:Panel>
<mx:Button click="load()" id="loader" x="25" y="445" label="Button"/>
</mx:Application>


**********Code 2***************

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute">
<mx:Panel x="25" y="10" width="528" height="383" layout="absolute">
<mx:SWFLoader id="mainswf" source="file.swf" x="10" y="10" 
width="467" height="271"/>
<mx:ApplicationControlBar x="10" y="0" width="539" height="60">
<mx:SWFLoader id="menu" source="menu.swf" width="499" height="58"/>
</mx:ApplicationControlBar>
</mx:Panel>
<mx:Button click="load()" id="loader" x="25" y="445" label="Button"/>
</mx:Application>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/TktRrD/gOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to