Macromedia Flash Server - Re: Sample code with instructions for steaming

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > April 2005 > Re: Sample code with instructions for steaming





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Sample code with instructions for steaming
Jake Hilton

2005-04-07, 5:45 pm

Bill,
To test whether the video driver works you could implement this code:

var my_video:Video; //my_video is a Video object on the Stage
var active_cam:Camera = Camera.get();
my_video.attachVideo(active_cam);

You have to make sure you have a video object on the stage with the
instance name of my_video. In order to do this if you don't know... In
the title bar of your library on the very right there is a menu button.
If you click that you can create a new video object in your library.
Once created drag that to your stage. Select it and in your properties
panel in the instance name input field put the name my_video. The above
code will find the first camera attached to your computer.. in this case
if the TechSmith Driver is the only video input device then it will
select that and display the output of that in the video object that you
placed on your stage. So test your movie and viola. It should work. To
hook this up to a flash com server you could do the following:

var my_video:Video; //my_video is a Video object on the Stage
var active_cam:Camera = Camera.get();
my_video.attachVideo(active_cam);

var my_nc:NetConnection = new NetConnection();
my_nc.connect("rtmp://myServer.myDomain.com/appName/appInstance");
var src_ns:NetStream = new NetStream(my_nc);
src_ns.publish("stephen", "record");
src_ns.attachVideo(active_cam);

// To stop publishing and recording
src_ns.publish(false);

// To play the recorded stream
src_ns.play("stephen");

Hope that helps.

Jake
[vbcol=seagreen]
Does anyone have some sample code with instructions for streaming
local
video through FCS? I am looking for something along the lines of
"Streaming
video through FCS for dummies" I am NO flash pogrammer and I do not
want
to pull one of my programmers off of current projeccts for a simple
test. I
have looked through the
http://www.flashcomguru.com/tutorials/camtasia.cfm
samle but it does not show me the FCS setup. Soimething with sample
code
where I can just change the FCS address wouyld be great!
I will be using the TechSmith OEM Screen Video Capture Driver v1.0.0
beta 1
for the local capture if it makes a difference.

Thank you
Bill Hoover

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com