[flexcoders] YouTube and LocalConnection

2007-01-22 Thread Ryan Stewart
Hi All,

I'm loading YouTube videos in my application using SWFLoader (I don't want to 
grab the FLV directly so I have to use SWF). The problem is that while the 
video plays, when I unload the SWF, the sound keeps playing. Calling AS3 
functions like stopAll(); does nothing, so I'm assuming I need to call 
stopAllSounds(); directly on the YouTube SWF.

In researching, I know I can use LocalConnection to talk to VM2 SWFs, but all 
of the examples I've seen are ones in which I would have access to the code in 
the VM2 SWF, which I don't. I'm not sure I totally understand how 
LocalConnection works, so I may be missing something, but I thought I'd ping 
the list and see if anyone could point me in the right direction. I'm also not 
a huge fan of using External interface, so that's my last resort right now.

Thanks in advance,

=Ryan


Re: [flexcoders] YouTube and LocalConnection

2007-01-22 Thread Bjorn Schultheiss

I'm working on something similar at the moment with vm1 swf's.

If your loading a vm2 movie into another vm2 movie, LocalConnection  
is not required.


if your loading vm1 movie into a vm2 movie, it sucks.
The vm1 movie must define a localconnection object and a connection  
string.

vm2 can then send messages via with that identical connection string.


Getting back to your original problem, unloading the swf should stop  
the sound from playing.
It does in my app. Are you getting the [UnloadSWF] message in your  
console?



Regards,

Bjorn


On 22/01/2007, at 10:26 PM, Ryan Stewart wrote:



Hi All,



I'm loading YouTube videos in my application using SWFLoader (I  
don't want to grab the FLV directly so I have to use SWF). The  
problem is that while the video plays, when I unload the SWF, the  
sound keeps playing. Calling AS3 functions like stopAll(); does  
nothing, so I'm assuming I need to call stopAllSounds(); directly  
on the YouTube SWF.




In researching, I know I can use LocalConnection to talk to VM2  
SWFs, but all of the examples I've seen are ones in which I would  
have access to the code in the VM2 SWF, which I don't. I'm not sure  
I totally understand how LocalConnection works, so I may be missing  
something, but I thought I'd ping the list and see if anyone could  
point me in the right direction. I'm also not a huge fan of using  
External interface, so that's my last resort right now.




Thanks in advance,



=Ryan







Re: [flexcoders] YouTube and LocalConnection

2007-01-22 Thread JesterXL

Make:
- Proxy.swf that loads the YouTube SWF's and interacts with them in  
Flash 8

- A class that talks to Proxy.swf via LocalConnection

While you don't have access to SWF's lower than 9, you can make your  
own SWF that DOES have a LocalConnection to talk to.  You then use  
this SWF as your middle-man to YouTube.swf's.


Just because you don't have access to the knowledge of knowing  
Japanese doesn't mean you can't use your friend who does know it to  
hit on the hottie-mo-hottie from Japan at the bar.  You dig?


On Jan 22, 2007, at 10:26 PM, Ryan Stewart wrote:


Hi All,



I'm loading YouTube videos in my application using SWFLoader (I don't  
want to grab the FLV directly so I have to use SWF). The problem is  
that while the video plays, when I unload the SWF, the sound keeps  
playing. Calling AS3 functions like stopAll(); does nothing, so I'm  
assuming I need to call stopAllSounds(); directly on the YouTube SWF.




In researching, I know I can use LocalConnection to talk to VM2 SWFs,  
but all of the examples I've seen are ones in which I would have  
access to the code in the VM2 SWF, which I don't. I'm not sure I  
totally understand how LocalConnection works, so I may be missing  
something, but I thought I'd ping the list and see if anyone could  
point me in the right direction. I'm also not a huge fan of using  
External interface, so that's my last resort right now.




Thanks in advance,



=Ryan






Re: [flexcoders] YouTube and LocalConnection

2007-01-22 Thread Ryan Stewart
Greatest analgy ever.

Thanks Jesse :)

=Ryan



-Original Message-
From: [EMAIL PROTECTED]
Sent: Monday, January 22, 2007 10:47 PM -08:00
To: flexcoders@yahoogroups.com
Subject: [flexcoders] YouTube and LocalConnection

Make:
- Proxy.swf that loads the YouTube SWF's and interacts with them in  
Flash 8
- A class that talks to Proxy.swf via LocalConnection

While you don't have access to SWF's lower than 9, you can make your  
own SWF that DOES have a LocalConnection to talk to.  You then use  
this SWF as your middle-man to YouTube.swf's.

Just because you don't have access to the knowledge of knowing  
Japanese doesn't mean you can't use your friend who does know it to  
hit on the hottie-mo-hottie from Japan at the bar.  You dig?

On Jan 22, 2007, at 10:26 PM, Ryan Stewart wrote:


Hi All,



I'm loading YouTube videos in my application using SWFLoader (I don't  
want to grab the FLV directly so I have to use SWF). The problem is  
that while the video plays, when I unload the SWF, the sound keeps  
playing. Calling AS3 functions like stopAll(); does nothing, so I'm  
assuming I need to call stopAllSounds(); directly on the YouTube SWF.



In researching, I know I can use LocalConnection to talk to VM2 SWFs,  
but all of the examples I've seen are ones in which I would have  
access to the code in the VM2 SWF, which I don't. I'm not sure I  
totally understand how LocalConnection works, so I may be missing  
something, but I thought I'd ping the list and see if anyone could  
point me in the right direction. I'm also not a huge fan of using  
External interface, so that's my last resort right now.



Thanks in advance,



=Ryan