Check out Christophe’s latest blog
entry which has some examples. http://www.coenraets.com/viewarticle.jsp?articleId=90.
The LiveMediaDisplay is something I hacked up to get Flashcom streaming
content working, we were having issues otherwise.
Matt
From: dave buhler
[mailto:[EMAIL PROTECTED]
Sent: Monday, February 07, 2005
6:09 PM
To: [email protected]
Subject: [flexcoders] Flex and
FlashCom = Referencing the MediaDisplay
I've built a FlashCom piece that:
1) works as a swf in HTML when built in Flash. The
MovieClip shows the
video stream from my camera
2) doesn't work in Flex. The MovieClip does not
show the video stream
from my camera. Nor do I get a message from the
player asking for me
to accept/decline sharing my camera.
The difference:
1) In Flash, I have an instance name on my
MovieClip.
2) In Flex, I have an ID name on my MediaDisplay.
That's the only difference between my two apps.
Flex Code that Doesn't work:
--------------------------------------------------------------------------------------
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
initialize="doConnect()"
backgroundColor="#7D8FA8">
<mx:Script>
<![CDATA[
function
doConnect() {
var client_cam =
Camera.get();
Live_vc.attachVideo(client_cam);
var client_nc= new
NetConnection();
client_nc.connect("rtmp:samples/sample_snapshot/room_01");
}
]]>
</mx:Script>
<mx:Panel width="516"
height="389">
<mx:MediaDisplay id="Live_vc"
/>
</mx:Panel>
</mx:Application>
Flash Code that Does work:
--------------------------------------------------------------------------------------
function doConnect() {
var client_cam =
Camera.get();
Live_vc.attachVideo(client_cam);
var client_nc= new
NetConnection();
client_nc.connect("rtmp:samples/sample_snapshot/room_01");
}
doConnect();
--------------------------------------------------------------------------------------
Any ideas on how I get my Flex App's MediaDisplay
to show the video-stream?
Dave
|