<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Leonardo França &#187; Flash Media Server</title>
	<atom:link href="http://www.leonardofranca.com/index.php/category/flash-media-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leonardofranca.com</link>
	<description>Flash Platform, Adobe AIR, ActionScript, Flash, RIA, Flex, Flash Media Server, RED5, Flash Lite, PHP, ZendAMF, AMFPHP, Java, GraniteDS, BlazeDS</description>
	<lastBuildDate>Wed, 08 Sep 2010 06:08:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Dynamic Streaming with Flash Media Server 3.5</title>
		<link>http://www.leonardofranca.com/index.php/2010/08/23/using-dynamic-streaming-with-flash-media-server-3-5/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/08/23/using-dynamic-streaming-with-flash-media-server-3-5/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:14:42 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash Media Server]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=615</guid>
		<description><![CDATA[
			
				
			
		
Adobe Flash has revolutionized the distribution of video content on the web, we have the Adobe Flash Media Server that helped with this by giving the possibility to distribute content via streaming, including the option to use encryption and features DRM (Digital Rights Management).
Adobe Flash has revolutionized the distribution of video content on the web, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F23%2Fusing-dynamic-streaming-with-flash-media-server-3-5%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F23%2Fusing-dynamic-streaming-with-flash-media-server-3-5%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Adobe Flash has revolutionized the distribution of video content on the web, we have the Adobe Flash Media Server that helped with this by giving the possibility to distribute content via streaming, including the option to use encryption and features DRM (Digital Rights Management)<span id="more-615"></span>.</p>
<blockquote><p>Adobe Flash has revolutionized the distribution of video content on the web, we have the Adobe Flash Media Server that helped with this by giving the possibility to distribute content via streaming, including the option to use encryption and features DRM (Digital Rights Management).</p></blockquote>
<p>O Adobe Flash Media Server 3.5 and Flash Player 10 brings some novelties, among them the possibility to use the Dynamic streaming for content distribution.<br />
Imagine the following scenario, you use a 3G internet limited(my case <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  ), glad you&#8217;re watching a video and notes of nothing, the video begins to catch, and you&#8217;ve used all your available bandwidth and now can only use the minimum that the carrier provides. Another scenario is that the same video can be viewed both via the desktop or any mobile device such as smartphones, which have limited memory, processing power and smaller screen. Flash Media Server can depending on network conditions and client resources, exchange content (audio, video or both) with one that better fits the current conditions of the customer, thus guaranteeing the QoS (Quality of Service).</p>
<blockquote><p>
Flash Media Server can depending on network conditions and client resources, exchange content (audio, video or both) with one that better fits the current conditions of the customer, thus guaranteeing the QoS (Quality of Service).
</p></blockquote>
<p><div id="attachment_893" class="wp-caption alignleft" style="width: 484px"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/va_dyn_str.png" alt="Dynamic Streaming helps ensure the QoS(Quality of Service)" title="Dynamic Streaming helps ensure the QoS(Quality of Service)" width="474" height="250" class="size-full wp-image-893" /><p class="wp-caption-text">Dynamic Streaming helps ensure the QoS(Quality of Service)</p></div><br />
Adobe recommends that you use dynamic streaming when you find the following criteria:</p>
<ul>
<li>Video with long duration.</li>
<liVideo with large file size.</li>
<li>HD video.</li>
<li>Video with larger dimensions, such as full screen video.</li>
<li>Content distributed to users who are more susceptible to bandwidth issues, such as home users, rather than corporate users</li>
</ul>
<blockquote><p>
QoS &#8211; Quality of Service &#8211; refers to resource reservation control mechanisms rather than the achieved service quality. Source: <a href="http://en.wikipedia.org/wiki/Quality_of_service">Wikipedia.</a>
</p></blockquote>
<p>See in detail the use of dynamic streaming in <a href="http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d56e-7fea.html">Adobe&#8217;s documentation</a>.<br />
See also these two articles devnet with fonts available for download:</p>
<ul>
<li><a href="http://www.adobe.com/go/fms_dynamicstreaming">Live dynamic streaming with Flash Media Server 3.5</a></li>
<li><a href="http://www.adobe.com/go/fms_dynstream_bestpractices">Dynamic streaming in Flash Media Server 3.5 – Part 1: Overview of the new capabilities</a></li>
</ul>
<p><strong>Recommended books:</strong><br />
<a href="http://www.amazon.com/gp/product/0240809475?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0240809475">Hands-On Guide to Flash Video: Web Video and Flash Media Server (Hands-On Guide Series)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0240809475" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0470131136?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470131136">Flash Video for Professionals: Expert Techniques for Integrating Video on the Web</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0470131136" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0979500303?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0979500303">Introduction to Flash Media Server 2</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0979500303" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/08/23/using-dynamic-streaming-with-flash-media-server-3-5/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>BR Conference</title>
		<link>http://www.leonardofranca.com/index.php/2010/07/12/br-conference/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/07/12/br-conference/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 16:27:35 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Media Server]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=570</guid>
		<description><![CDATA[
			
				
			
		
BR Conference 2010 is the first event held in Brazil on RIA (Rich Internet Application) and ColdFusion.
With the support of  Adobe Systems Inc&#8217;s  and share some of the best and most renowned professionals in the world the tools and technologies ColdFusion, Flex, AIR, Flash Media Server and LiveCycle, BR Conference 2010 is an [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F12%2Fbr-conference%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F12%2Fbr-conference%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><div id="attachment_745" class="wp-caption alignleft" style="width: 200px"><a href="http://www.brconference.com/en/"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/07/banner_brconference_190x70.png" alt="" title="banner_brconference_190x70" width="190" height="70" class="size-full wp-image-745" /></a><p class="wp-caption-text">BR Conference</p></div><br />
BR Conference 2010 is the first event held in Brazil on RIA (Rich Internet Application) and ColdFusion.<br />
With the support of <a href="http://www.adobe.com/"> Adobe Systems Inc&#8217;s </a> and share some of the best and most renowned professionals in the world the tools and technologies ColdFusion, Flex, AIR, Flash Media Server and LiveCycle, BR Conference 2010 is an event created by developers for developers.<br />
<a href="http://www.brconference.com/en/"> Learn more &#8230; </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/07/12/br-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authenticating users in Flash Media Server with Flash Media Live Encoder</title>
		<link>http://www.leonardofranca.com/index.php/2010/07/05/authenticating-users-in-flash-media-server-with-flash-media-live-encoder/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/07/05/authenticating-users-in-flash-media-server-with-flash-media-live-encoder/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 16:43:50 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Flash Media Server]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=559</guid>
		<description><![CDATA[
			
				
			
		
Adobe Flash Media Live Encoder is a free software that Adobe offers for you to use to convey stream directly to a server and deploy Flash Media Server for your Web site or application.
Among the options available are:

High Quality Encode
H264 / VP6 Video
AAC / MP3 Audio
Command-line
Error Handling
VITC Timecode
Pre-processing
Live Metadata
Local Archive
DVR Support

With support for a variety [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F05%2Fauthenticating-users-in-flash-media-server-with-flash-media-live-encoder%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F05%2Fauthenticating-users-in-flash-media-server-with-flash-media-live-encoder%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Adobe Flash Media Live Encoder is a free software that Adobe offers for you to use to convey stream directly to a server and deploy Flash Media Server for your Web site or application<span id="more-559"></span>.<br />
Among the options available are:</p>
<ul>
<li>High Quality Encode</li>
<li>H264 / VP6 Video</li>
<li>AAC / MP3 Audio</li>
<li>Command-line</li>
<li>Error Handling</li>
<li>VITC Timecode</li>
<li>Pre-processing</li>
<li>Live Metadata</li>
<li>Local Archive</li>
<li>DVR Support</li>
</ul>
<p>With support for a variety of capture devices like webcam video, SDI, Composite, Component, Firewire.<br />
There are cases where you need to restrict access to Flash Media Server via the Flash Media Live Encoder for that Adobe has created a plugin that is installed on your server, Flash Media Server, Flash Media Server Authentication Add-in.<br />
Para instalar esse plugin, siga os seguintes passos:<br />
Download and install Flash Media Server Authentication Add-in<br />
<a href="https://www.adobe.com/cfusion/entitlement/index.cfm?e=fmle3">https://www.adobe.com/cfusion/entitlement/index.cfm?e=fmle3</a><br />
Then use the command prompt and go to conf directory Flash Media Server<br />
C:\Arquivos de programas\Adobe\Flash Media Server 3.5\conf<br />
To create a new user, simply use the command: </p>
<blockquote><p>users add -u user -p 123</p></blockquote>
<p>Where is the user login and password is 123<br />
Note that the directory C:\Arquivos de programas\Adobe\Flash Media Server 3.5\conf Now there are two files, users.exe and users.dat, logins and passwords are saved in users.dat<br />
Now simply open the Flash Media Live Encoder and try to connect, it asks login and password.<br />
One of the advantages of Flash Media Live Encoder is that it recognizes most devices that capture the Flash Player.<br />
More:<br />
<a href="http://www.adobe.com/products/flashmediaserver/flashmediaencoder/">http://www.adobe.com/products/flashmediaserver/flashmediaencoder/</a><br />
<a href="http://www.adobe.com/support/documentation/en/flashmedialiveencoder/">http://www.adobe.com/support/documentation/en/flashmedialiveencoder/</a></p>
<p>Recommended Books:<br />
<a href="http://www.amazon.com/gp/product/0240809475?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0240809475">Hands-On Guide to Flash Video: Web Video and Flash Media Server (Hands-On Guide Series)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0240809475" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0470131136?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470131136">Flash Video for Professionals: Expert Techniques for Integrating Video on the Web</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0470131136" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0979500303?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0979500303">Introduction to Flash Media Server 2</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0979500303" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p>Translations:<br />
<a href="http://wp.me/pkvj1-ar">Português do Brasil</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/07/05/authenticating-users-in-flash-media-server-with-flash-media-live-encoder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple protection of content from Flash Media Server</title>
		<link>http://www.leonardofranca.com/index.php/2010/03/05/simple-protection-of-content-from-flash-media-server/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/03/05/simple-protection-of-content-from-flash-media-server/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 17:27:30 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Media Server]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=542</guid>
		<description><![CDATA[
			
				
			
		
I was called to resolve a problem with the protection of the contents of a client, the problem was that somebody malicious was stealing their live streams.
He simply took the html code of the site and pasted on her website, so you may transmit the content in your blog. The player in question was not [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F03%2F05%2Fsimple-protection-of-content-from-flash-media-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F03%2F05%2Fsimple-protection-of-content-from-flash-media-server%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I was called to resolve a problem with the protection of the contents of a client, the problem was that somebody malicious was stealing their live streams.<br />
He simply took the html code of the site and pasted on her website<span id="more-542"></span>, so you may transmit the content in your blog. The player in question was not developed by me, so I did not even bother to look at the source, I decided to go directly to the Flash Media Server.<br />
Based on the documentation from Adobe, I decided in a very simple code main.asc is as follows:</p>
<div class="igBar"><span id="ljavascript-3"><a href="#" onclick="javascript:showPlainTxt('javascript-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-3">
<div class="javascript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;init application...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #003366; font-weight: bold;">var</span> VALID_REFERRER <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.mydomain.com.br/mySwf.swf&quot;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #003366; font-weight: bold;">var</span> VALID_PAGEURL <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.mydomain.com.br/myPage.html&quot;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">application.<span style="color: #660066;">onAppStart</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;init app...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStart&gt; &quot;</span> <span style="color: #339933;">+</span> application.<span style="color: #000066;">name</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; is starting at &quot;</span> <span style="color: #339933;">+</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">application.<span style="color: #660066;">onStatus</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>info<span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onStatus&gt; info.level: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">level</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;, info.code: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">code</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onStatus&gt; info.description: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onStatus&gt; info.details: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">details</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">application.<span style="color: #660066;">onConnect</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>client.<span style="color: #660066;">referrer</span> <span style="color: #339933;">==</span> VALID_REFERRER <span style="color: #339933;">&amp;&amp;</span> client.<span style="color: #660066;">pageUrl</span> <span style="color: #339933;">==</span> VALID_PAGEURL<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;acesso permitido&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; application.<span style="color: #660066;">acceptConnection</span><span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;acesso indevido&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; application.<span style="color: #660066;">rejectConnection</span><span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onConnect&gt; client.ip: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #660066;">ip</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onConnect&gt; client.pageUrl: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #660066;">pageUrl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onConnect&gt; client.agent: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #660066;">agent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onConnect&gt; client.referrer: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #660066;">referrer</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onConnect&gt; client.protocol: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #660066;">protocol</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">application.<span style="color: #660066;">onDisconnect</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onDisconnect&gt; client.name: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onDisconnect&gt; disconnecting at: &quot;</span> <span style="color: #339933;">+</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">application.<span style="color: #660066;">onAppStop</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>info<span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStop&gt; application.name: &quot;</span> <span style="color: #339933;">+</span> application.<span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStop&gt; stopping at &quot;</span> <span style="color: #339933;">+</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStop&gt; info.level: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">level</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStop&gt; info.code: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">code</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStop&gt; info.description: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
The API Flash Media Server is very powerful and contains many interesting features, one of them is the ability to know where exactly the connection is coming from the swf. This passage has solved the problem with the constants declared at the beginning of the file.</p>
<div class="igBar"><span id="ljavascript-4"><a href="#" onclick="javascript:showPlainTxt('javascript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-4">
<div class="javascript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>client.<span style="color: #660066;">referrer</span> <span style="color: #339933;">==</span> VALID_REFERRER <span style="color: #339933;">&amp;&amp;</span> client.<span style="color: #660066;">pageUrl</span> <span style="color: #339933;">==</span> VALID_PAGEURL<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;acesso permitido&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; application.<span style="color: #660066;">acceptConnection</span><span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;acesso indevido&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; application.<span style="color: #660066;">rejectConnection</span><span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
In short, so the connection is made with Flash Media Server is attempting to connect comes from a SWF and HTML defined by me.<br />
A very simple solution but it solved the problem <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
As a last resort, the thief also copied the swf client and put into your blog <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>References:<br />
<a href="http://www.adobe.com/devnet/flashmediaserver/articles/protecting_video_fms.pdf">http://www.adobe.com/devnet/flashmediaserver/articles/protecting_video_fms.pdf</a><br />
<a href="http://www.flashcomguru.com/index.cfm/2007/7/3/video-content-protection">http://www.flashcomguru.com/index.cfm/2007/7/3/video-content-protection</a><br />
<a href="http://www.adobe.com/devnet/flashmediaserver/articles/digital_media_protection.html">http://www.adobe.com/devnet/flashmediaserver/articles/digital_media_protection.html</a><br />
<a href="http://www.adobe.com/devnet/flashmediaserver/articles/protecting_video_fms.html">http://www.adobe.com/devnet/flashmediaserver/articles/protecting_video_fms.html</a><br />
<a href="http://blogs.adobe.com/security/2007/07/how_to_protect_flash_video_wit.html">http://blogs.adobe.com/security/2007/07/how_to_protect_flash_video_wit.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/03/05/simple-protection-of-content-from-flash-media-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flash Camp Brasil = Success!!!</title>
		<link>http://www.leonardofranca.com/index.php/2010/01/18/flash-camp-brasil-sucess/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/01/18/flash-camp-brasil-sucess/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 14:49:32 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Media Server]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=531</guid>
		<description><![CDATA[
			
				
			
		
The event was unprecedented in Brazil, the Flash Camp Brasil, occurred in the last days 15 and 16 in Maceió, Brazil.
To begin with, was an adventure can go to the event, with tickets and expensive hotel crowded, but it is something that would not miss for the world.
I was staying in a hostel and lucky [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F01%2F18%2Fflash-camp-brasil-sucess%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F01%2F18%2Fflash-camp-brasil-sucess%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><div id="attachment_592" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/01/18012010001.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/01/18012010001-300x225.jpg" alt="Flash Camp Brasil - I've been there!!!" title="18012010(001)" width="300" height="225" class="size-medium wp-image-592" /></a><p class="wp-caption-text">Flash Camp Brasil - I've been there!!!</p></div><br />
The event was unprecedented in Brazil, the <a href="http://www.flashcampbrasil.com.br/">Flash Camp Brasil</a>, occurred in the last days 15 and 16 in Maceió, Brazil.<br />
To begin with, was an adventure can go to the event, with tickets and expensive hotel crowded, but it is something that would not miss for the world<span id="more-531"></span>.<br />
I was staying in a hostel and lucky for me, on the morning of day 15, shared a post from the street, and my notebook with a damaged battery, I decided to go to the hotel of the event to familiarize myself with the way.<br />
The path to the hostel to the hotel was closer than imagined, having only to wait anxiously for 7 hours until the event start.<br />
While waiting and sitting on the couch with a provision making(ufa!!!), reunion the Gabriela Zaninetti, Marketing Manager of Adobe Systems Brasil, soon after going to the place of lecture and mini-courses, met <a href="http://www.actioncriacoes.net/portfolio/">Demian Borba</a> was already in full swing in the last preparations for the event and introduced me to <a href="http://www.lipao.com.br/">Filipe Cunha</a> of Globo.com, sorry that did not to attend the mini-course it. Who was it was also <a href="http://www.pedrotaranto.com.br/">Pedro Taranto</a>(we almost ran into the airport).<br />
Shortly after the Gabi introduced me to <a href="http://www.fmanzi.com.br/">Fabricio Manzi</a>, guy who knew the years and only in the event I can finally meet you in person. Then I had the opportunity to meet <a href="http://www.vorttice.com">Tiago Venegas</a>, with whom he later exchanged ideas on Flash Media Server, Cássio Souza, Technical Director <a href="www.gringo.nu">Gringo</a> and Diego of <a href="http://www.coc.com.br">COC</a>, after some talk time, arrives<a href="http://www.igorcosta.com/blog/">Igor Costa</a>, another so that the web and knew I had the opportunity to meet personally, I played a little Mortal Kombat vs DC Comics and took a beating by <a href="http://www.netoleal.com.br/">Neto Leal</a>.<br />
A few minutes before the event, entering the auditorium, reunion the <a href="http://theflashblog.com/">Lee</a> with whom I had a quick conversation about our trips were.<br />
In between I had the opportunity to meet <a href="http://www.becklog.org/">Beck Novaes,</a> in which I showed a bit of a speech that would do the next day. At the end of the event, I know <a href="http://www.brunoribeiro.net/">Bruno Ribeiro</a> who told me about the project that won the mini ignite.</p>
<p><strong>About the sessions</strong><br />
<strong>First day</strong><br />
Well, full auditorium, all fully prepared and Demian opened the event with an exciting presentation on <a href="http://www.efmexperience.com">EFM</a> and how did your dream to make a Flash Camp in Brazil.</p>
<p><a href="http://www.bigspaceship.com">Joshua Hirsch</a> Minister of Technology of the Big Spaceship, commented on how your company works and has demonstrated some very interesting projects in which the developer program so even in the latest stage of the project, first you need to buy a machine to smoke.</p>
<p>The second lecture was the <a href="http://www.32bits.com.br">Daniel Morena</a> Creative Director of the Agency 32 Bits, about 1.0 Enhanced Reality, that really surprised me, systems showed he made a few years with the Flash Platform using multitouch when not imagined that. I could personally give my congratulations to Daniel Morena.</p>
<p><strong>Second day</strong><br />
O segundo dia se iniciou com a palestra do <a href="http://www.blog.rivello.org/">Sam Rivello</a>, CEO of <a href="http://www.rivellomultimediaconsulting.com">RMC</a>, biology compared with programming, demonstrated in a simple and objective simulation of biological behavior in programming in Flex 4.</p>
<p>The second lecture was that of Igor Costa, and relaxed and animated, it showed 40 differences considered significant change between Flex 3 and Flex 4.</p>
<p>Tiago Venegas began his lecture by explaining what's new in Flash Media Server 3.5, demonstrated vorttice, a tool conference that owes nothing to the Adobe Connect, also shown as is done dynamic stream. </p>
<p>Next, Lee explained some news about Flash Player 10.1 and created an example using the Adobe Flash CS5 exporting directly to a native application for IPhone.</p>
<p>The presentation of Cássio Souza began with a story about how the way you work in, then explained design pattern <a href="http://github.com/cassiozen/AS3-State-Machine">State Machine</a>. You may have used State Machine and did not know.</p>
<p><a href="http://www.danieldura.com/">Daniel Dura</a> told the story of the multitouch and demonstrated how it can be worked in Flash Platform. </p>
<p>The talk of closure of the event was dedicated to the Beck Novaes about OutBox, and in my opinion, was closed on a high note, was simply fantastic, I think one of the best speeches of the event. </p>
<p>This was a summary on how fast it was my adventure in Flash Camp Brasil and the ultimate feeling is that it was very worthwhile, Maceió was perfect for the event and a cry marked the Flash Camp Brasil: "<strong>sa porra!!!</strong>".</p>
<p>See more pictures:<br />
<a href="http://www.garagem.com.br/novo_garagem/eventos/flashweb/1024/index.php?cd_evento=1227">http://www.garagem.com.br/novo_garagem/eventos/flashweb/1024/index.php?cd_evento=1227</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/01/18/flash-camp-brasil-sucess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stream with Flex or Flash or Flash Lite and Flash Media Server</title>
		<link>http://www.leonardofranca.com/index.php/2009/08/22/stream-with-flex-or-flash-or-flash-lite-and-flash-media-server/</link>
		<comments>http://www.leonardofranca.com/index.php/2009/08/22/stream-with-flex-or-flash-or-flash-lite-and-flash-media-server/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 03:58:54 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Flash Media Server]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=458</guid>
		<description><![CDATA[
			
				
			
		
Recent years have seen an explosion of growth of multimedia content available, but also the growing use of broadband, we have more users with access to multimedia content, but the main factor was the ease that Flash brought to this kind of implementation of rich content (or you think that if youtube was done with [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2009%2F08%2F22%2Fstream-with-flex-or-flash-or-flash-lite-and-flash-media-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2009%2F08%2F22%2Fstream-with-flex-or-flash-or-flash-lite-and-flash-media-server%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Recent years have seen an explosion of growth of multimedia content available, but also the growing use of broadband, we have more users with access to multimedia content, but the main factor was the ease that Flash brought to this kind of implementation of rich content (or you think that if youtube was done with windows media, would have the same result <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ), Including mobile devices. Recently we had the highest peaks of people accessing streamed content with the <a href="http://www.flashstreamworks.com/archive.php?post_id=1247089954">funeral of Michael Jackson, not only surpassed by the Obama's Inauguration</a>.<br />
<div id="attachment_494" class="wp-caption aligncenter" style="width: 266px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2009/08/fms_with_flash_platform.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2009/08/fms_with_flash_platform.jpg" alt="Adobe Flash Media Server e Flash Platform" title="fms_with_flash_platform" width="256" height="200" class="size-full wp-image-494" /></a><p class="wp-caption-text">Adobe Flash Media Server and Flash Platform</p></div><br />
The aim of this paper is to demonstrate how we can make the mere distribution of content streamed using Adobe Flash Media Server along with the <strong>Flash Platform</strong><span id="more-458"></span>.</p>
<p>We will see how to implement a service stream with Adobe Flex, Adobe Flash and Adobe Flash Lite along with the streaming server Adobe Flash Media Server.<br />
<div id="attachment_493" class="wp-caption aligncenter" style="width: 514px"><a href="http://tinyurl.com/installfms"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2009/08/adobe_flash_media_server.jpg" alt="Adobe Flash Media Server 3.5" title="adobe_flash_media_server" width="504" height="273" class="size-full wp-image-493" /></a><p class="wp-caption-text">Adobe Flash Media Server 3.5</p></div><br />
Adobe Flash Media Server, currently in its version 3.5, has three versions available:</p>
<ul>
<li>Adobe Flash Media Streaming Server - for transmission to the streaming content with the Flash Platform</li>
<li>Adobe Flash Media Interactive Server - For interactive applications, multi-way communication, videos in real-time, audio, and data sharing.</li>
<li>Adobe Flash Media Development Server - Contains all the features of FMIS, being free and limited to 10 simultaneous connections.</li>
</ul>
<p>In addition to these versions, there are the following:</p>
<ul>
<li><a href="http://www.adobe.com/products/flashmediaencoding/">Adobe Flash Media Encoding Server</a> - Server to convert most formats of videos available on the market for Flash Video format (FLV).</li>
<li><a href="http://www.adobe.com/products/flashmediarightsmanagement/">Adobe Flash Media Rights Management Server </a>- To protect multimedia content used with Adobe Media Player and Adobe AIR.</li>
</ul>
<p><strong>Preparing the Adobe Flash Media Server </strong><br />
The version used in tutorial is Flash Media Server 3.5, see how to install <a href="http://tinyurl.com/installfms">this article from Tom Green</a>, make sure that the server is running normally, and we will create the directory of our application for example, by default, the directories of the applications are created in the path: "C: \ Program Files \ Adobe \ Flash Media Server 3.5 \ applications", I changed the file fms.ini (C: \ Program Files \ Adobe \ Flash Media Server 3.5 \ conf) in the constant "VHOST . APPSDIR "to" C: \ apache \ htdocs \ applications \ ".<br />
That done, let's create the directory of our application giving the name "videoondemand" and within that, another folder called "streams" and within this, a directory called "_definst_" where videos should be saved.<br />
Our structure is ready to receive the videos will be provided for streaming with Flash Media Server, one last detail is to create a file called "main.asc" and save in "videoondemanda" can even be empty, he will be responsible for Flash Media Server recognizes the application. Let's test the console application using Flash Media Server, ( "C: \ Program Files \ Adobe \ Flash Media Server 3.5 \ webroot \ swfs \ fms_adminConsole.swf"), View Applications tab, select the server in my case will place in combobox "new instance ...". select videoOnDemand "if everything is correct, the island had begun to monitor the application.  You should see something like the image below:<br />
<div id="attachment_464" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2009/07/console_videoondemand.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2009/07/console_videoondemand-300x213.jpg" alt="Flash Media Server Console" title="console_videoondemand" width="300" height="213" class="size-medium wp-image-464" /></a><p class="wp-caption-text">Flash Media Server Console</p></div><br />
<strong>Stream with Flash and Flash Media Server</strong><br />
Now we just need to create our client that will run the videos, we have several ways to implement this, I will start using Adobe Flash CS4 Professional.</p>
<ul>
<li>Go to "Files-> New .." select Flash File (ActionScript 3.0).</li>
<li>In the library panel, click on the "new Video. Give the name of instance "vd. In Type leave selecting "Video (ActionScript-controlled).<div id="attachment_468" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2009/07/flash_cs4_new_video.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2009/07/flash_cs4_new_video-300x213.jpg" alt="Adobe Flash CS4" title="flash_cs4_new_video" width="300" height="213" class="size-medium wp-image-468" /></a><p class="wp-caption-text">Adobe Flash CS4</p></div></li>
<li>Create a layer to write our ActionScript.</li>
</ul>
<p>In the initial code, instantiate the class NetConnection to make the connection to Flash Media Server:</p>
<div class="igBar"><span id="lactionscript3-16"><a href="#" onclick="javascript:showPlainTxt('actionscript3-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-16">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6699cc; font-weight: bold;">var</span> rtmp<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;rtmp://localhost/videoOnDemand&quot;</span>;<span style="color: #009900;">//your domain Flash Media Server//</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6699cc; font-weight: bold;">var</span> nc<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netconnection%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netconnection.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetConnection</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=netconnection%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netconnection.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetConnection</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> doConnect<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; nc.<span style="color: #004993;">connect</span><span style="color: #000000;">&#40;</span>rtmp<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">//nc.objectEncoding=ObjectEncoding.AMF0; // only for Flash Media Server 2</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; nc.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=netstatusevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstatusevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStatusEvent</span></a>.<span style="color: #004993;">NET_STATUS</span>, handlerNetStatus<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> handlerNetStatus<span style="color: #000000;">&#40;</span>evt<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netstatusevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstatusevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStatusEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">info</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Object</span></a>=evt.<span style="color: #004993;">info</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">info</span>.<span style="color: #004993;">code</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">doConnect<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
By doing so, we will test pressing ctrl + enter, if all goes well, we should see the following message in the output:</p>
<blockquote><p>NetConnection.Connect.Success</p></blockquote>
<p>Now just implement a function that will instantiate the NetStream class, responsible for the video stream, soon after adding the movieclip that will run the video.</p>
<div class="igBar"><span id="lactionscript3-17"><a href="#" onclick="javascript:showPlainTxt('actionscript3-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-17">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> doStream<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> ns<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netstream%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstream.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStream</span></a>=<span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=netstream%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstream.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStream</span></a><span style="color: #000000;">&#40;</span>nc<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; vd.<span style="color: #004993;">attachNetStream</span><span style="color: #000000;">&#40;</span>ns<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; ns.<span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;sneeze&quot;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; ns.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=netstatusevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstatusevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStatusEvent</span></a>.<span style="color: #004993;">NET_STATUS</span>, handlerNetStreamStatus<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; ns.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=asyncerrorevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:asyncerrorevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">AsyncErrorEvent</span></a>.<span style="color: #004993;">ASYNC_ERROR</span>,<span style="color: #004993;">onMetaData</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> handlerNetStreamStatus<span style="color: #000000;">&#40;</span>evt<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netstatusevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstatusevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStatusEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">info</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Object</span></a>=evt.<span style="color: #004993;">info</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">info</span>.<span style="color: #004993;">code</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
We should have the following result:<br />
<div id="attachment_498" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2009/08/sample1_stream_flashcs4.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2009/08/sample1_stream_flashcs4-300x213.jpg" alt="Stream com Flash e Flash Media Server" title="sample1_stream_flashcs4" width="300" height="213" class="size-medium wp-image-498" /></a><p class="wp-caption-text">Stream com Flash e Flash Media Server</p></div><br />
<strong><a href="http://www.leonardofranca.com.br/files/streamFlashCS4.zip">DOWNLOAD SOURCE</a></strong></p>
<p><strong>Using the FLVPlayback component</strong></p>
<ul>
<li>Go to "Files-> New .." select Flash File (ActionScript 3.0).</li>
<li>In dry go to "Window-> Components or Ctrl + F7, drag the FLVPlayback component to the stage, in the name of instance myFLVPlayback</li>
</ul>
<p>Now we have to "tell" the component that will be using a video stream content, simply set the isLive property to true:</p>
<div class="igBar"><span id="lactionscript3-18"><a href="#" onclick="javascript:showPlainTxt('actionscript3-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-18">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> fl.video.<span style="color: #000000; font-weight: bold;">*</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">flvPlayer.isLive=<span style="color: #0033ff; font-weight: bold;">true</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">flvPlayer.<span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;rtmp://localhost/videoondemand/sneeze&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">flvPlayer.<span style="color: #004993;">scaleMode</span> = VideoScaleMode.MAINTAIN_ASPECT_RATIO;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">flvPlayer.<span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Stream with Flex and Flash Media Server </strong><br />
We will see some examples implementing Adobe Flex, the first example will be using the Video class, we instantiate it and add a simple canvas component.<br />
The basics are very similar as done in Adobe Flash.<br />
<strong>Using the Video class</strong></p>
<div class="igBar"><span id="lactionscript3-19"><a href="#" onclick="javascript:showPlainTxt('actionscript3-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-19">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> url_rtmp<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;rtmp://localhost/videoOnDemand&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> nc<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netconnection%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netconnection.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetConnection</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=netconnection%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netconnection.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetConnection</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> ns<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netstream%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstream.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStream</span></a>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> localVideo<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=video%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:video.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Video</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=video%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:video.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Video</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;color:#800000;">320</span>,<span style="color: #000000; font-weight:bold;color:#800000;">240</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> videoHolder<span style="color: #000000; font-weight: bold;">:</span>UIComponent;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Added the init function to be loaded as createComplete the application:</p>
<div class="igBar"><span id="lactionscript3-20"><a href="#" onclick="javascript:showPlainTxt('actionscript3-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-20">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; nc.<span style="color: #004993;">connect</span><span style="color: #000000;">&#40;</span>url_rtmp<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">call</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">//nc.objectEncoding = ObjectEncoding.AMF0; // for Adobe Flash Media Server 2.0</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; nc.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=netstatusevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstatusevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStatusEvent</span></a>.<span style="color: #004993;">NET_STATUS</span>,netStatusHandler<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; btnView.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">MouseEvent</span></a>.<span style="color: #004993;">CLICK</span>,<span style="color: #004993;">play</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
We will have a function to check if the connection to Flash Media Server was successful.</p>
<div class="igBar"><span id="lactionscript3-21"><a href="#" onclick="javascript:showPlainTxt('actionscript3-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-21">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> netStatusHandler<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netstatusevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstatusevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStatusEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">info</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Object</span></a> = e.<span style="color: #004993;">info</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">info</span>.<span style="color: #004993;">code</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">switch</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">info</span>.<span style="color: #004993;">code</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #990000;">&quot;NetConnection.Connect.Success&quot;</span><span style="color: #000000; font-weight: bold;">:</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; btnView.<span style="color: #004993;">enabled</span> = <span style="color: #0033ff; font-weight: bold;">true</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; btnView.label = <span style="color: #990000;">&quot;Play&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">break</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #990000;">&quot;NetConnection.Connect.Closed&quot;</span><span style="color: #000000; font-weight: bold;">:</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">break</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Function callCamera be responsible for "building" the video (localvideos) to add it in the holder (instance of UIComponent) and only then adding the canvas (cv).</p>
<div class="igBar"><span id="lactionscript3-22"><a href="#" onclick="javascript:showPlainTxt('actionscript3-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-22">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">call</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> holder<span style="color: #000000; font-weight: bold;">:</span>UIComponent = <span style="color: #0033ff; font-weight: bold;">new</span> UIComponent<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; localVideo = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=video%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:video.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Video</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;color:#800000;">320</span>,<span style="color: #000000; font-weight:bold;color:#800000;">240</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; holder.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>localVideo<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; cv.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>holder<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Now implementing the rest of the code.</p>
<div class="igBar"><span id="lactionscript3-23"><a href="#" onclick="javascript:showPlainTxt('actionscript3-23'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-23">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span>evt<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; ns = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=netstream%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstream.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStream</span></a><span style="color: #000000;">&#40;</span>nc<span style="color: #000000;">&#41;</span>; &nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; ns.<span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;sneeze&quot;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; localVideo.<span style="color: #004993;">attachNetStream</span><span style="color: #000000;">&#40;</span>ns<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; ns.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=netstatusevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstatusevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStatusEvent</span></a>.<span style="color: #004993;">NET_STATUS</span>,netStatusHandlerNC<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> netStatusHandlerNC<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netstatusevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstatusevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">NetStatusEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">info</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Object</span></a> = e.<span style="color: #004993;">info</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">info</span>.<span style="color: #004993;">code</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Mxml code in this source:<br />
<strong><a href="http://www.leonardofranca.com.br/files/streamFlex.zip">DOWNLOAD SOURCE</a></strong></p>
<p><strong>Using the component VideoDisplay</strong><br />
The implementation of this component created by <a href="http://www.peldi.com/">Giacomo (Peldi) Guilizzoni</a> after being included in the Flex Framework should be the most difficult of all <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> , Or I'll take the time to explain.</p>
<div class="igBar"><span id="lactionscript3-24"><a href="#" onclick="javascript:showPlainTxt('actionscript3-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-24">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Application xmlns<span style="color: #000000; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #990000;">&quot;absolute&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>VideoDisplay id=<span style="color: #990000;">&quot;vd&quot;</span> <span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;rtmp://localhost/videoondemand/streams/sneeze.flv&quot;</span> <span style="color: #004993;">x</span>=<span style="color: #990000;">&quot;10&quot;</span> <span style="color: #004993;">y</span>=<span style="color: #990000;">&quot;10&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>Application<span style="color: #000000; font-weight: bold;">&gt;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
<strong><a href="http://www.leonardofranca.com.br/files/streamFlex.zip">DOWNLOAD SOURCE</a></strong></p>
<p><strong>Using the FLVPlayback component in Flex</strong><br />
The component can also be FLVPlaybak using Adobe Flex, for this just follow the following steps:</p>
<ul>
<li>Go to "directory to install the Adobe Flash\Common\Configuration\Components\Video\".</li>
<li>FLVPlaybackAS3.swc Copy the file to your project in Flex Builder</li>
<li>Choose the skin (the installation directory of the Adobe Flash \ Common \ Configuration \ FLVPlayback Skins \ ActionScript 3.0) of your preference and save on your project.</li>
</ul>
<p>Now just instantiate the class instance and adds it to the stage:</p>
<div class="igBar"><span id="lactionscript3-25"><a href="#" onclick="javascript:showPlainTxt('actionscript3-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-25">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Application xmlns<span style="color: #000000; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #990000;">&quot;absolute&quot;</span> creationComplete=<span style="color: #990000;">&quot;createVideo();&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx.core.UIComponent;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> fl.video.FLVPlayback;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> fl.video.VideoScaleMode;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> createVideo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> vid<span style="color: #000000; font-weight: bold;">:</span>FLVPlayback = <span style="color: #0033ff; font-weight: bold;">new</span> FLVPlayback<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> ui<span style="color: #000000; font-weight: bold;">:</span>UIComponent = <span style="color: #0033ff; font-weight: bold;">new</span> UIComponent<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">//this.addChild(ui);</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ui.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>vid<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flvbp.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>ui<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vid.<span style="color: #004993;">width</span> = <span style="color: #000000; font-weight:bold;color:#800000;">320</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vid.<span style="color: #004993;">height</span> = <span style="color: #000000; font-weight:bold;color:#800000;">240</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vid.<span style="color: #004993;">source</span> = <span style="color: #990000;">&quot;rtmp://localhost/videoondemand/sneeze&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vid.skinBackgroundColor = 0x666666;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vid.skin = <span style="color: #990000;">&quot;skins/SkinUnderPlayStopSeekFullVol.swf&quot;</span>; <span style="color: #009900;">// salvar o skin no projeto</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vid.<span style="color: #004993;">scaleMode</span> = VideoScaleMode.MAINTAIN_ASPECT_RATIO;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vid.skinAutoHide = <span style="color: #0033ff; font-weight: bold;">false</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000000; font-weight: bold;">&gt;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Canvas id=<span style="color: #990000;">&quot;flvbp&quot;</span> <span style="color: #004993;">x</span>=<span style="color: #990000;">&quot;0&quot;</span> <span style="color: #004993;">y</span>=<span style="color: #990000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>Application<span style="color: #000000; font-weight: bold;">&gt;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Stream with Flash Lite and Flash Media Server</strong><br />
Adobe Flash Lite 3.0 introduced some new ones, the ability to play video streamed directly with Adobe Flash Media Server. Joining this with the growing use of 3G and models of phones with Flash Lite (the work everyone has a Nokia N95, the less I <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ) , We have an unprecedented range of possibilities in world.<br />
To schedule content for Flash Lite, we will use Adobe Flash CS4 and ActionScript 2.0 programming (still can not use ActionScript 3.0 or even Adobe Flex).</p>
<ul>
<li>Go to "Files-> New .." select Flash File (Mobile).</li>
<li>Then, will open the Adobe Device Central CS4, pick any phone model that supports Flash Lite 3.0, has no case, ask for the Device Central update your library.</li>
<li>We will do the same thing we did to play stream with Flash CS4, In the library, click on the "new Video. Give the name of instance "vd. In Type leave selecting "Video (ActionScript-controlled).</li>
<li>Create a layer to write our ActionScript.</li>
</ul>
<p>In the initial code, instantiate the class NetConnection to make the connection to Flash Media Server, if successful, begin the stream:</p>
<div class="igBar"><span id="lactionscript-26"><a href="#" onclick="javascript:showPlainTxt('actionscript-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-26">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">//#include &quot;BandwidthAS2.as&quot;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> rtmp:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;rtmp://localhost/webcam&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">client_nc = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetConnection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">client_nc.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span>rtmp<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">fscommand2<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;FullScreen&quot;</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">client_nc.<span style="color: #0066CC;">onStatus</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>info<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Level: &quot;</span>+info.<span style="color: #0066CC;">level</span>+<span style="color: #ff0000;">&quot; Code: &quot;</span>+info.<span style="color: #006600;">code</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span>info.<span style="color: #006600;">code</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;NetConnection.Connect.Success&quot;</span> :</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; doPlay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;NetConnection.Connect.Closed&quot;</span> :</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> doPlay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; in_ns = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetStream</span><span style="color: #66cc66;">&#40;</span>client_nc<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; vd.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span>in_ns<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; in_ns.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;sneeze&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; in_ns.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
One detail that we must look at the setting of publication, we put the option "Local Playback" to "Access network only", but the video will not run on the phone.<br />
<div id="attachment_496" class="wp-caption aligncenter" style="width: 197px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2009/08/setting_flash_lite_31.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2009/08/setting_flash_lite_31-187x300.jpg" alt="Configuração de publicação para p Flash Lite 3.1" title="setting_flash_lite_31" width="187" height="300" class="size-medium wp-image-496" /></a><p class="wp-caption-text">Configuração de publicação para o Flash Lite 3.1</p></div><br />
That done, we have the following result:<br />
<div id="attachment_508" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2009/08/stream_FlashLite_emulator.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2009/08/stream_FlashLite_emulator-300x214.jpg" alt="Adobe Device Central" title="stream_FlashLite_emulator" width="300" height="214" class="size-medium wp-image-508" /></a><p class="wp-caption-text">Adobe Device Central</p></div><br />
Now it so save the swf and test the phone, you can also save it as Flash Lite 3.1 and use Adobe Mobile Package to create an installer .sis (to Simbiam) or .cab (for windows mobile) for your mobile.</p>
<p><strong><a href="http://www.leonardofranca.com.br/files/streamFlashLite31.zip">DOWNLOAD SOURCE</a></strong></p>
<p><strong>Bonus 1</strong><br />
<strong>Stream with Adobe Dreamweaver CS4 and Flash Media Server</strong><br />
Ok ok, not quite but it is an alternative for those not familiar with Adobe Flash or Adobe Flex. Let it:</p>
<ul>
<li>Create a blank html page.</li>
<li>Go to "Insert-> Media-> FLV .</li>
<li>In Video type, select "Streaming Video".</li>
<li>On server load URI put rtmp://localhost/videoondemand/.</li>
<li>In stream name, put the name of the video, in our case will "sneeze".</li>
<li>Configure the remaining options to your liking, save the page and open in your browser (Dreamweaver will copy some files to your next page)</li>
</ul>
<p><strong>Bonus 2</strong><br />
Some useful tools for developing with Adobe Flash Media Server, including an update of the FLVPlayback with support for Dynamic Streaming and DVR.<br />
<a href="http://www.adobe.com/products/flashmediaserver/tool_downloads/">http://www.adobe.com/products/flashmediaserver/tool_downloads/</a></p>
<p><strong>Bonus 3</strong><br />
The file main.asc used in the example has an implementation to detect the speed of bandwidth used and we can create a feature to determine a video that best fits User Connection. This file appears in the examples that are located in the installation of Adobe Flash Media Server.</p>
<p><strong><a href="http://www.leonardofranca.com.br/files/fms.zip">DOWNLOAD SOURCE</a></strong></p>
<p><strong>Flash Media Server Developer Center</strong><br />
<a href="http://www.adobe.com/devnet/flashmediaserver/">http://www.adobe.com/devnet/flashmediaserver/</a></p>
<p>Recommended Books:<br />
<a href="http://www.amazon.com/gp/product/0240809475?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0240809475">Hands-On Guide to Flash Video: Web Video and Flash Media Server (Hands-On Guide Series)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0240809475" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0470131136?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470131136">Flash Video for Professionals: Expert Techniques for Integrating Video on the Web</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0470131136" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0979500303?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0979500303">Introduction to Flash Media Server 2</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0979500303" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_65ff9a38-c191-4128-aae5-a171ba61d28f"  WIDTH="500px" HEIGHT="175px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F65ff9a38-c191-4128-aae5-a171ba61d28f&#038;Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F65ff9a38-c191-4128-aae5-a171ba61d28f&#038;Operation=GetDisplayTemplate" id="Player_65ff9a38-c191-4128-aae5-a171ba61d28f" quality="high" bgcolor="#ffffff" name="Player_65ff9a38-c191-4128-aae5-a171ba61d28f" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="175px" width="500px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F65ff9a38-c191-4128-aae5-a171ba61d28f&#038;Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT></p>
<p><strong>Translations:</strong><br />
<a href="http://www.leonardofranca.com.br/index.php/2009/08/21/stream-com-flex-ou-flash-ou-flash-lite-e-flash-media-server/">Português do Brasil</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2009/08/22/stream-with-flex-or-flash-or-flash-lite-and-flash-media-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex with Flash Media Server!!!</title>
		<link>http://www.leonardofranca.com/index.php/2006/03/12/flex-with-flash-media-server/</link>
		<comments>http://www.leonardofranca.com/index.php/2006/03/12/flex-with-flash-media-server/#comments</comments>
		<pubDate>Mon, 13 Mar 2006 00:19:32 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Flash Media Server]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com.br/index.php/2006/03/12/flex-with-flash-media-server/</guid>
		<description><![CDATA[
			
				
			
		
A well interesting article on as to use Flex 2 with Flash Media Server, is a simple example but of the one notion of as to use the class NetConnection and NetStream in Flex 2 and to feel some differences in the Action Script 3.0. 
link of the article:  http://flash-communications.net/technotes/fms2/flex2FMS/index.html  
See the application [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2006%2F03%2F12%2Fflex-with-flash-media-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2006%2F03%2F12%2Fflex-with-flash-media-server%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>A well interesting article on as to use Flex 2 with Flash Media Server, is a simple example but of the one notion of as to use the class NetConnection and NetStream in Flex 2 and to feel some differences in the Action Script 3.0. </p>
<p>link of the article: <a href="http://flash-communications.net/technotes/fms2/flex2FMS/index.html"> http://flash-communications.net/technotes/fms2/flex2FMS/index.html </a> </p>
<p><a href="http://www.osfederais.com/fms/flex2FMS/flex2FMS.html">See the application working</a><br />
14/03/2006 *** UPDATE ******<br />
I found another article on Flex and Flash Media Server written by <a href="http://coenraets.com/index.jsp">Christophe Coenraets</a>, very good for signal!<br />
Link of the article: <a href="http://coenraets.com/viewarticle.jsp?articleId=98"> http://coenraets.com/viewarticle.jsp?articleId=98 </a><br />
<a href="http://www.osfederais.com/fms/flex2FMS/fms.html">Link for the application</a> </p>
<p><a href="http://www.macromedia.com/software/flashplayer/public_beta/">For to see the examples is need to have the Flash Player 9</a> </p>
<p>To know more: Programming Flash Communication Server<br />
<a href="http://flash-communications.net/index.html">http://flash-communications.net/index.html </a><br />
Adobe Labs <a href="http://labs.macromedia.com/">http://labs.macromedia.com/ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2006/03/12/flex-with-flash-media-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating one playlist with Flash Communication Server/Flash Media Server.</title>
		<link>http://www.leonardofranca.com/index.php/2006/03/04/creating-one-playlist-with-flash-communication-serverflash-media-server/</link>
		<comments>http://www.leonardofranca.com/index.php/2006/03/04/creating-one-playlist-with-flash-communication-serverflash-media-server/#comments</comments>
		<pubDate>Sat, 04 Mar 2006 11:53:17 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Media Server]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com.br/index.php/2006/03/04/creating-one-playlist-with-flash-communication-serverflash-media-server/en/</guid>
		<description><![CDATA[
			
				
			
		
We saw in the previous article as to record they stream using the Flash Communication Server/Flash Media Server, now we go to implement one playlist for this resource. Each video that to record will be added playlist for later being seen.
For this we will use the SharedObject Remote to keep the information of the recorded [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2006%2F03%2F04%2Fcreating-one-playlist-with-flash-communication-serverflash-media-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2006%2F03%2F04%2Fcreating-one-playlist-with-flash-communication-serverflash-media-server%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>We saw in the <a href="http://www.leonardofranca.com.br/index.php/2006/01/24/recording-streaming-with-flash-communication-serverflash-media-server/en/">previous article</a> as to record they stream using the Flash Communication Server/Flash Media Server, now we go to implement one playlist for this resource. Each video that to record will be added playlist for later being seen.<span id="more-185"></span></p>
<p>For this we will use the <a href="http://livedocs.macromedia.com/fms/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&#038;file=00000607.html">SharedObject Remote</a> to keep the information of the recorded videos. SharedObjects offers sharing of information in real time between multiplos customers SWF' s being able to be persistent in schemes local or in the remote server. The Shared place object would be as "<a href="http://en.wikipedia.org/wiki/HTTP_cookie">Cookies</a>" and the SharedObject Remote as transference of data in real-time.</p>
<p>It opens a new document in the Flash, we go to create two movies clips of the video type, to add to a video object in its library, opens the panel library (windom Video object you your library, open the Library panel (Window > Library or Ctrl+L or F11) adds to one embedded Video object to it selecting New Video in the options of library.</p>
<p>First connecting to the Flashcom/Flash Media Server:</p>
<div class="igBar"><span id="lactionscript-33"><a href="#" onclick="javascript:showPlainTxt('actionscript-33'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-33">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">client_nc = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetConnection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">client_nc.<span style="color: #0066CC;">onStatus</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>info<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Level: &quot;</span>+info.<span style="color: #0066CC;">level</span>+<span style="color: #ff0000;">&quot; &nbsp; Code: &quot;</span>+info.<span style="color: #006600;">code</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">client_nc.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;rtmp:/playlist&quot;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//considerando localhost</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Recouping the data of the Shared Object Remote, and filling component “List” using the method onSync, this method is the responsible one for the synchronization of data with the server.</p>
<div class="igBar"><span id="lactionscript-34"><a href="#" onclick="javascript:showPlainTxt('actionscript-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-34">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rec_so = <span style="color: #0066CC;">SharedObject</span>.<span style="color: #006600;">getRemote</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;videos&quot;</span>, client_nc.<span style="color: #006600;">uri</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rec_so.<span style="color: #006600;">onSync</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">list</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">Play_list</span>.<span style="color: #006600;">removeAll</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i <span style="color: #b1b100;">in</span> <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">rec_so</span>.<span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">Play_list</span>.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rec_so.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span>client_nc<span style="color: #66cc66;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>In the first line it notices that we give the name of "video" to the object created, the third parameter "true" will guarantee that the data remain in the server, in case that parameter were passed falsifies, the data so would remain while the user was connected to the application. In stage we will have two textfields, one with the name of instance of "ListItem" of the type "input" and another one with the o name of instance of "Status_msg" of the type "dynamic", also will have two movie clips of the type video, one to receive it webcam with the name of instance of "live" and other to show the selected videos of the list with "the published" name of instance of. We create a function to record stream it:</p>
<div class="igBar"><span id="lactionscript-35"><a href="#" onclick="javascript:showPlainTxt('actionscript-35'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-35">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> doRecord<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>ListItem.<span style="color: #0066CC;">text</span> == <span style="color: #0066CC;">undefined</span> <span style="color: #66cc66;">||</span> ListItem.<span style="color: #0066CC;">text</span> == <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Necessario um titulo.&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; ListItem.<span style="color: #0066CC;">setFocus</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Record_btn.<span style="color: #006600;">label</span> == <span style="color: #ff0000;">&quot;Record&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Recording...&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Play_btn.<span style="color: #006600;">label</span> == <span style="color: #ff0000;">&quot;Stop&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; doPlay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Play_btn.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; out_ns = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetStream</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">client_nc</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; out_ns.<span style="color: #0066CC;">attachAudio</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Microphone</span>.<span style="color: #0066CC;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> teste_cam:<span style="color: #0066CC;">Camera</span> = <span style="color: #0066CC;">Camera</span>.<span style="color: #0066CC;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; live.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span>teste_cam<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; out_ns.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span>teste_cam<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; out_ns.<span style="color: #006600;">publish</span><span style="color: #66cc66;">&#40;</span>ListItem.<span style="color: #0066CC;">text</span>, <span style="color: #ff0000;">&quot;record&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">rec_so</span>.<span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#91;</span>ListItem.<span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#93;</span> = ListItem.<span style="color: #0066CC;">text</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">rec_so</span>.<span style="color: #0066CC;">flush</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Record_btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Stop&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Record_btn.<span style="color: #006600;">label</span> == <span style="color: #ff0000;">&quot;Stop&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; out_ns.<span style="color: #0066CC;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Play_btn.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Record_btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Record&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; ListItem.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;...&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Interesting detail in the method "publish" of the NetStream class, that can have three arguments, its syntax is the following one:</p>
<blockquote>
<ul>
<li>record: saved the archive as flv in the server, if the archive already to exist will be sobrescrito.</li>
<li>
append: saved the archive as flv in the server, adding from the safe archive previously.</li>
<li>
live: it transmits to the living without saving, if the archive to exist will be deleted.</li>
</ul>
</blockquote>
<p>Creating the method to play the video of the list.</p>
<div class="igBar"><span id="lactionscript-36"><a href="#" onclick="javascript:showPlainTxt('actionscript-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-36">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> doPlay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Play_btn.<span style="color: #006600;">label</span> == <span style="color: #ff0000;">&quot;Play&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Playing...&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Play_btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Stop&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> playFileName = Play_list.<span style="color: #006600;">selectedItem</span>.<span style="color: #006600;">label</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">in_ns</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetStream</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">client_nc</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; publicado.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">in_ns</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">in_ns</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span>playFileName<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; in_ns.<span style="color: #0066CC;">onStatus</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>info<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>info.<span style="color: #0066CC;">level</span> == <span style="color: #ff0000;">&quot;error&quot;</span> <span style="color: #66cc66;">||</span> info.<span style="color: #006600;">code</span> == <span style="color: #ff0000;">&quot;NetStream.Play.Stop&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Stopped sending data...&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Play_btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Play&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Play_btn.<span style="color: #006600;">label</span> == <span style="color: #ff0000;">&quot;Stop&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Stop...&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; in_ns.<span style="color: #0066CC;">onStatus</span> = <span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; in_ns.<span style="color: #0066CC;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Play_btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Play&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Finishing with the creation dynamically of the buttons, the list and associating the methods doRecord and doPlay to the events of the buttons.</p>
<div class="igBar"><span id="lactionscript-37"><a href="#" onclick="javascript:showPlainTxt('actionscript-37'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-37">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Play_list.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;change&quot;</span>, listListener<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> Play_list = <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">createClassObject</span><span style="color: #66cc66;">&#40;</span>mx.<span style="color: #006600;">controls</span>.<span style="color: #0066CC;">List</span>, <span style="color: #ff0000;">&quot;Play_list&quot;</span>, <span style="color: #cc66cc;color:#800000;">1</span>, <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">_x</span>:<span style="color: #cc66cc;color:#800000;">357</span>, <span style="color: #0066CC;">_y</span>:<span style="color: #cc66cc;color:#800000;">214</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Play_list.<span style="color: #006600;">setSize</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">148</span>, <span style="color: #cc66cc;color:#800000;">177</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> Play_btn = <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">createClassObject</span><span style="color: #66cc66;">&#40;</span>mx.<span style="color: #006600;">controls</span>.<span style="color: #0066CC;">Button</span>, <span style="color: #ff0000;">&quot;Play_btn&quot;</span>, <span style="color: #cc66cc;color:#800000;">2</span>, <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">_x</span>:<span style="color: #cc66cc;color:#800000;">170</span>, <span style="color: #0066CC;">_y</span>:<span style="color: #cc66cc;color:#800000;">216</span>, label:<span style="color: #ff0000;">&quot;Play&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> Record_btn = <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">createClassObject</span><span style="color: #66cc66;">&#40;</span>mx.<span style="color: #006600;">controls</span>.<span style="color: #0066CC;">Button</span>, <span style="color: #ff0000;">&quot;Record_btn&quot;</span>, <span style="color: #cc66cc;color:#800000;">3</span>, <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">_x</span>:<span style="color: #cc66cc;color:#800000;">47</span>, <span style="color: #0066CC;">_y</span>:<span style="color: #cc66cc;color:#800000;">216</span>, label:<span style="color: #ff0000;">&quot;Record&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Record_btn.<span style="color: #0066CC;">onRelease</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp;doRecord<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Play_btn.<span style="color: #0066CC;">onRelease</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp;doPlay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> listListener:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">listListener.<span style="color: #006600;">change</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>evt_obj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> playFileName = evt_obj.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">selectedItem</span>.<span style="color: #006600;">label</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>playFileName<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; in_ns.<span style="color: #0066CC;">pause</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; in_ns = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetStream</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">client_nc</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; publicado.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span>in_ns<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; in_ns.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span>playFileName<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The code complete:</p>
<div class="igBar"><span id="lactionscript-38"><a href="#" onclick="javascript:showPlainTxt('actionscript-38'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-38">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">client_nc = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetConnection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">client_nc.<span style="color: #0066CC;">onStatus</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>info<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Level: &quot;</span>+info.<span style="color: #0066CC;">level</span>+<span style="color: #ff0000;">&quot; &nbsp; Code: &quot;</span>+info.<span style="color: #006600;">code</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">client_nc.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;rtmp://200.219.239.68/osfederais/playlist&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rec_so = <span style="color: #0066CC;">SharedObject</span>.<span style="color: #006600;">getRemote</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;recordings&quot;</span>, client_nc.<span style="color: #006600;">uri</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rec_so.<span style="color: #006600;">onSync</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">list</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">_root</span>.<span style="color: #006600;">Play_list</span>.<span style="color: #006600;">removeAll</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i <span style="color: #b1b100;">in</span> <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">rec_so</span>.<span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">Play_list</span>.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rec_so.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span>client_nc<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> doRecord<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>ListItem.<span style="color: #0066CC;">text</span> == <span style="color: #0066CC;">undefined</span> <span style="color: #66cc66;">||</span> ListItem.<span style="color: #0066CC;">text</span> == <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Necessario um titulo.&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ListItem.<span style="color: #0066CC;">setFocus</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Record_btn.<span style="color: #006600;">label</span> == <span style="color: #ff0000;">&quot;Record&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Recording...&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Play_btn.<span style="color: #006600;">label</span> == <span style="color: #ff0000;">&quot;Stop&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;doPlay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Play_btn.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">out_ns</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetStream</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">client_nc</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">out_ns</span>.<span style="color: #0066CC;">attachAudio</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Microphone</span>.<span style="color: #0066CC;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">teste_cam</span> = <span style="color: #0066CC;">Camera</span>.<span style="color: #0066CC;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">live</span>.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span>teste_cam<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">out_ns</span>.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">teste_cam</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">out_ns</span>.<span style="color: #006600;">publish</span><span style="color: #66cc66;">&#40;</span>ListItem.<span style="color: #0066CC;">text</span>, <span style="color: #ff0000;">&quot;record&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">rec_so</span>.<span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#91;</span>ListItem.<span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#93;</span> = ListItem.<span style="color: #0066CC;">text</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">rec_so</span>.<span style="color: #0066CC;">flush</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Record_btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Stop&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Record_btn.<span style="color: #006600;">label</span> == <span style="color: #ff0000;">&quot;Stop&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">out_ns</span>.<span style="color: #0066CC;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Play_btn.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Record_btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Record&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ListItem.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;...&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> doPlay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Play_btn.<span style="color: #006600;">label</span> == <span style="color: #ff0000;">&quot;Play&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Playing...&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Play_btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Stop&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> playFileName = Play_list.<span style="color: #006600;">selectedItem</span>.<span style="color: #006600;">label</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">in_ns</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetStream</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">client_nc</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; publicado.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">in_ns</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">in_ns</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span>playFileName<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">in_ns</span>.<span style="color: #0066CC;">onStatus</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>info<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>info.<span style="color: #0066CC;">level</span> == <span style="color: #ff0000;">&quot;error&quot;</span> <span style="color: #66cc66;">||</span> info.<span style="color: #006600;">code</span> == <span style="color: #ff0000;">&quot;NetStream.Play.Stop&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;parado...&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Play_btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Play&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Play_btn.<span style="color: #006600;">label</span> == <span style="color: #ff0000;">&quot;Stop&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Status_msg.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Stop...&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">in_ns</span>.<span style="color: #0066CC;">onStatus</span> = <span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">in_ns</span>.<span style="color: #0066CC;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Play_btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Play&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Play_list.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;change&quot;</span>, cbListener<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> Play_list = <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">createClassObject</span><span style="color: #66cc66;">&#40;</span>mx.<span style="color: #006600;">controls</span>.<span style="color: #0066CC;">List</span>, <span style="color: #ff0000;">&quot;Play_list&quot;</span>, <span style="color: #cc66cc;color:#800000;">1</span>, <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">_x</span>:<span style="color: #cc66cc;color:#800000;">357</span>, <span style="color: #0066CC;">_y</span>:<span style="color: #cc66cc;color:#800000;">214</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Play_list.<span style="color: #006600;">setSize</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">148</span>, <span style="color: #cc66cc;color:#800000;">177</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> Play_btn = <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">createClassObject</span><span style="color: #66cc66;">&#40;</span>mx.<span style="color: #006600;">controls</span>.<span style="color: #0066CC;">Button</span>, <span style="color: #ff0000;">&quot;Play_btn&quot;</span>, <span style="color: #cc66cc;color:#800000;">2</span>, <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">_x</span>:<span style="color: #cc66cc;color:#800000;">170</span>, <span style="color: #0066CC;">_y</span>:<span style="color: #cc66cc;color:#800000;">216</span>, label:<span style="color: #ff0000;">&quot;Play&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> Record_btn = <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">createClassObject</span><span style="color: #66cc66;">&#40;</span>mx.<span style="color: #006600;">controls</span>.<span style="color: #0066CC;">Button</span>, <span style="color: #ff0000;">&quot;Record_btn&quot;</span>, <span style="color: #cc66cc;color:#800000;">3</span>, <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">_x</span>:<span style="color: #cc66cc;color:#800000;">47</span>, <span style="color: #0066CC;">_y</span>:<span style="color: #cc66cc;color:#800000;">216</span>, label:<span style="color: #ff0000;">&quot;Record&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Record_btn.<span style="color: #0066CC;">onRelease</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;doRecord<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Play_btn.<span style="color: #0066CC;">onRelease</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;doPlay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> cbListener:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">cbListener.<span style="color: #006600;">change</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>evt_obj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">var</span> playFileName = evt_obj.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">selectedItem</span>.<span style="color: #006600;">label</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>playFileName<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;in_ns.<span style="color: #0066CC;">pause</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;in_ns = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetStream</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">client_nc</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;publicado.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span>in_ns<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;in_ns.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span>playFileName<span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>To define its application in the server, it creates a diretory called "playlist" in its server the Flash Communication Server/Flash Media Server. It gives to ctrl+enter to test the application<br />
<a href="http://www.osfederais.com/fms/playlist/playlist.html">It sees application in functioning</a></p>
<p>more<br />
Flash Media Server Developer Center<br />
<a href="http://www.macromedia.com/devnet/flashmediaserver/">http://www.macromedia.com/devnet/flashmediaserver/</a></p>
<p>FlashComGuru<br />
<a href="http://www.flashcomguru.com/">http://www.flashcomguru.com/</a></p>
<p>FlashCom.com.br<br />
<a href="http://www.flashcom.com.br/">http://www.flashcom.com.br/</a></p>
<p>Flash Media Server Fun<br />
<a href="http://www.fczone.com/">http://www.fczone.com/</a></p>
<p><iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=12&#038;l=st1&#038;mode=books&#038;search=Flash%20Communication%20Server&#038;fc1=000000&#038;lt1=&#038;lc1=3366FF&#038;bg1=FFFFFF&#038;f=ifr" marginwidth="0" marginheight="0" width="300" height="250" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2006/03/04/creating-one-playlist-with-flash-communication-serverflash-media-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Webcam with Flash Communication Server/Flash Media Server</title>
		<link>http://www.leonardofranca.com/index.php/2005/12/03/testing-webcam-with-flash-communication-serverflash-media-server/</link>
		<comments>http://www.leonardofranca.com/index.php/2005/12/03/testing-webcam-with-flash-communication-serverflash-media-server/#comments</comments>
		<pubDate>Sat, 03 Dec 2005 23:42:52 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Media Server]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com.br/index.php/2005/12/03/testing-webcam-with-flash-communication-serverflash-media-server/en/</guid>
		<description><![CDATA[
			
				
			
		
The Flash Media Server/Flash Communication Server is a server of stream developed by Macromedia, with it can be developed applicatory of the most varied as complex videoconferences , chats, stream of audio, video and what more the imagination to allow.  We will see with the time as to develop a complex application and robust [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2005%2F12%2F03%2Ftesting-webcam-with-flash-communication-serverflash-media-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2005%2F12%2F03%2Ftesting-webcam-with-flash-communication-serverflash-media-server%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>The Flash Media Server/Flash Communication Server is a server of stream developed by Macromedia, with it can be developed applicatory of the most varied as complex videoconferences , chats, stream of audio, video and what more the imagination to allow.  We will see with the time as to develop a complex application and robust using the FMS/FCS, however, I go to look for to show as to make this without using the ready components of the Flash.<span id="more-110"></span></p>
<p><a href="http://forum.flashcom.com.br/viewtopic.php?t=2">Installing and creating its first application in FlahCom </a><br />
Having the FMS/FCS installed correctly in its machine or the server, we go to test connection and to create small applicatory that will test its they webcam </p>
<p>Opens a new document in the Flash, presses F11 to open the library, later inserts a new item in the library (New Video) as in the image below: </p>
<p><img src="http://www.osfederais.com/img/new_video.gif" alt="Inserindo novo video" /></p>
<p>It drags this item for palco of the Flash, gives the name of instance “live�?.  presses F9 to open the window of Actions.<br />
Create one variavel for connection. </p>
<div class="igBar"><span id="lactionscript-46"><a href="#" onclick="javascript:showPlainTxt('actionscript-46'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-46">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> teste_nc:<span style="color: #0066CC;">NetConnection</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetConnection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Testing the connection.</p>
<div class="igBar"><span id="lactionscript-47"><a href="#" onclick="javascript:showPlainTxt('actionscript-47'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-47">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">teste_nc.<span style="color: #0066CC;">onStatus</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>info<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Level: &quot;</span>+info.<span style="color: #0066CC;">level</span>+<span style="color: #ff0000;">&quot; &nbsp; Code: &quot;</span>+info.<span style="color: #006600;">code</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Connecting the server FMS/FCS</p>
<div class="igBar"><span id="lactionscript-48"><a href="#" onclick="javascript:showPlainTxt('actionscript-48'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-48">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">teste_nc.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;rtmp://doman&quot;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//for localhost use rtmp:/aplication</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Getting images of webcam</p>
<div class="igBar"><span id="lactionscript-49"><a href="#" onclick="javascript:showPlainTxt('actionscript-49'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-49">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> teste_cam:<span style="color: #0066CC;">Camera</span> = <span style="color: #0066CC;">Camera</span>.<span style="color: #0066CC;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Insert the images of webcam in instance of video create</p>
<div class="igBar"><span id="lactionscript-50"><a href="#" onclick="javascript:showPlainTxt('actionscript-50'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-50">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">live.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span>teste_cam<span style="color: #66cc66;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The code:</p>
<div class="igBar"><span id="lactionscript-51"><a href="#" onclick="javascript:showPlainTxt('actionscript-51'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-51">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> teste_nc:<span style="color: #0066CC;">NetConnection</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetConnection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">teste_nc.<span style="color: #0066CC;">onStatus</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>info<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Level: &quot;</span>+info.<span style="color: #0066CC;">level</span>+<span style="color: #ff0000;">&quot; &nbsp; Code: &quot;</span>+info.<span style="color: #006600;">code</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">teste_nc.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;rtmp://dominio&quot;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//para localhost use </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> teste_cam:<span style="color: #0066CC;">Camera</span> = <span style="color: #0066CC;">Camera</span>.<span style="color: #0066CC;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">live.<span style="color: #0066CC;">attachVideo</span><span style="color: #66cc66;">&#40;</span>teste_cam<span style="color: #66cc66;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Test the swf(ctrl+enter) if everything will be certain swf will ask to it if it will be able to have access its webcam, accepting you will see its webcam functioning. </p>
<p><a href="http://www.osfederais.com/fms/cam.html">see the test</a></p>
<p>***UPDATE*** 18/02/2006<br />
When you use the method "Camera.get();" automatically the Flash Player shows to the user the option to allow or to deny the access of the flash they webcam it.  In this we can know if the access or was allowed not using the function onStatus later as in the following example: </p>
<div class="igBar"><span id="lactionscript-52"><a href="#" onclick="javascript:showPlainTxt('actionscript-52'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-52">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> client_cam = <span style="color: #0066CC;">Camera</span>.<span style="color: #0066CC;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">client_cam.<span style="color: #0066CC;">onStatus</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>infoObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span>infoObj.<span style="color: #006600;">code</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'Camera.Muted'</span> :</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Camera deny&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'Camera.Unmuted'</span> :</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Camera access&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Flash Media Server Developer Center<br />
<a href="http://www.macromedia.com/devnet/flashmediaserver/">http://www.macromedia.com/devnet/flashmediaserver/</a></p>
<p>FlashComGuru<br />
<a href="http://www.flashcomguru.com/">http://www.flashcomguru.com/</a></p>
<p>FlashCom.com.br<br />
<a href="http://www.flashcom.com.br/">http://www.flashcom.com.br/</a></p>
<p><iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=12&#038;l=st1&#038;mode=books&#038;search=Flash%20Communication%20Server&#038;fc1=000000&#038;lt1=&#038;lc1=3366FF&#038;bg1=FFFFFF&#038;f=ifr" marginwidth="0" marginheight="0" width="300" height="250" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2005/12/03/testing-webcam-with-flash-communication-serverflash-media-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
