Hi Alex,
thanks for the hint. I thought new instanciating the local connection object in
my client
swf should do the job but I had to close the connection too.
Now, that code works for me: (Really strange that I create a new
localconnection object
and then close it ... But maybe the connection ID exists anywhere?)
//Connection
var receivingLC:LocalConnection;
receivingLC = new LocalConnection();
closeConnection();
receivingLC.client = this;
receivingLC.connect('AVM1controlConn');
function closeConnection(){
try
{
receivingLC.close();
}
catch (err:Error)
{
trace("error at closeConnection: " + err.message)
}
}
Many thanks.
--- In [email protected], Alex Harui <aha...@...> wrote:
>
> Did the child SWF close the connection? If so, how did you wire that up to
> make sure it
actually got a chance to do that?
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
>
> From: [email protected] [mailto:[email protected]] On
> Behalf Of
ronaldk999
> Sent: Wednesday, February 11, 2009 12:32 PM
> To: [email protected]
> Subject: [flexcoders] SWFLoader and LocalConnection
>
>
> Hi there,
>
> I'm struggeling with a strange issue:
>
> I need to load multiple SWFs and call a function inside them. All SWFs
> contain a
> localconnection. I know a local connection ID can only exist once. Is it
> possible to load
and
> unload these SWFs with the same connection ID?
>
> The first call of
> swfLoader.source = "clip1.swf";
>
> works. But if I try to load the next one with
> swfLoader.source = "clip2.swf";
>
> doesnt work. I've already tried to close the connection and recreate the
> localconnection
> object. But nothing works for me.
>
> Any ideas?
>
> Many thanks.
>
> Best regards,
>
> Werner
>