<?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>simra &#187; Flash</title>
	<atom:link href="http://www.simra.ch/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simra.ch</link>
	<description>development &#38; design</description>
	<lastBuildDate>Fri, 26 Mar 2010 15:57:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Best photos of the year 2009 (flash gallery)</title>
		<link>http://www.simra.ch/2010/02/best-photos-of-the-year-2009-flash-gallery/</link>
		<comments>http://www.simra.ch/2010/02/best-photos-of-the-year-2009-flash-gallery/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 22:45:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1181</guid>
		<description><![CDATA[This is a little flash gallery of some of my favorite photos I took in 2009.


swfobject.embedSWF("http://www.simra.ch/uploads/photos/best-photos-of-the-year-2009/photos.swf", "best-photos-of-the-year-2009", "450", "400", "9.0.0","http://www.simra.ch/uploads/photos/best-photos-of-the-year-2009/", {}, {wmode:"transparent",base:"."});

]]></description>
			<content:encoded><![CDATA[<p>This is a little flash gallery of some of my favorite photos I took in 2009.<br />
<span id="more-1181"></span><br />
<script type="text/javascript">
swfobject.embedSWF("http://www.simra.ch/uploads/photos/best-photos-of-the-year-2009/photos.swf", "best-photos-of-the-year-2009", "450", "400", "9.0.0","http://www.simra.ch/uploads/photos/best-photos-of-the-year-2009/", {}, {wmode:"transparent",base:"."});</script></p>
<div id="best-photos-of-the-year-2009"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/02/best-photos-of-the-year-2009-flash-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash AS3 Gallery</title>
		<link>http://www.simra.ch/2009/11/flash-as3-gallery/</link>
		<comments>http://www.simra.ch/2009/11/flash-as3-gallery/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 20:09:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Tween]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=666</guid>
		<description><![CDATA[Eine Flash Bildergallerie, die dynamisch Bilder über ein Php-Script lädt, wobei die Bilder in einem Verzeichnis ermittelt werden und per XML-File ausgegeben werden. Über ein zweites Php-Script werden die Bilder verkleinert. ]]></description>
			<content:encoded><![CDATA[<p>Eine Flash Bildergallerie, die dynamisch Bilder über ein Php-Script lädt, wobei die Bilder in einem Verzeichnis ermittelt werden und per XML-File ausgegeben werden. Über ein zweites Php-Script werden die Bilder verkleinert.<br />
<span id="more-666"></span><br />
<a href="http://www.simra.ch/uploads/2009/11/flash_gallery.jpg"></p>
<div class="box-back">
<div class="box-con">
<img src="http://www.simra.ch/uploads/2009/11/flash_gallery-300x200.jpg" alt="Flash AS3 Gallery Printscreen" title="Flash AS3 Gallery Printscreen" width="300" height="200" class="alignnone size-thumbnail wp-image-674" />
</div>
<div class="box-front"><span>front image</span></div>
</div>
<p></a></p>
<p>Die Gallerie kann unter der foldenden Adresse angeschaut werden:</p>
<p><a href="http://pics.simra.ch">Flash AS3 Gallery</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2009/11/flash-as3-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>randomly appearing words</title>
		<link>http://www.simra.ch/2009/10/randomly-appearing-words/</link>
		<comments>http://www.simra.ch/2009/10/randomly-appearing-words/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 03:16:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://blog.simra.ch/?p=425</guid>
		<description><![CDATA[This flash example will show you how to randomly fade words in and out. You can use it, for example, on a banner. All the animation is done with ActionScript, so no timeline animation is needed. Check it out!]]></description>
			<content:encoded><![CDATA[<p>This flash example will show you how to randomly fade words in and out. You can use it, for example, on a banner. All the animation is done with ActionScript, so no timeline animation is needed. Check it out!<br />
<span id="more-425"></span><br />
<a href="http://www.simra.ch/uploads/downloads/as3/appearing-words/main.swf" target="_blank">Open Example</a><br />
<a href="http://www.simra.ch/uploads/downloads/as3/appearing-words/source.zip">Download Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2009/10/randomly-appearing-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing flv movies with AS3</title>
		<link>http://www.simra.ch/2009/08/playing-flv-movies-with-as3/</link>
		<comments>http://www.simra.ch/2009/08/playing-flv-movies-with-as3/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 10:28:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.simra.ch/?p=223</guid>
		<description><![CDATA[This is a little example of how to play .FLV files in Flash.You can use pre-made components (AS3 FLVPlayback ) to do so, but sometimes, for whatever reason, you want to do it yourself.
Here&#8217;s the outcome&#8230; click on the movie to start and pause it



Let&#8217;s get startet&#8230;
First of all you need a .flv file. You [...]]]></description>
			<content:encoded><![CDATA[<p>This is a little example of how to play .FLV files in Flash.You can use pre-made components (AS3 FLVPlayback ) to do so, but sometimes, for whatever reason, you want to do it yourself.</p>
<p style="padding-top:1.4em;">Here&#8217;s the outcome&#8230; click on the movie to start and pause it</p>
<p><span><span><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="307" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.simra.ch/files/flash/player/Player.swf" /><embed type="application/x-shockwave-flash" width="400" height="307" src="http://www.simra.ch/files/flash/player/Player.swf"></embed></object><br />
</span></span></p>
<p><span id="more-223"></span></p>
<p style="padding-top:1.4em;">Let&#8217;s get startet&#8230;</p>
<p>First of all you need a .flv file. You can use <a href="http://www.keepvid.com">www.keepvid.com</a> to download files from youtube.</p>
<p style="padding-top:1.4em;">This is our main class, the &#8220;entering point&#8221; of our program:</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">package</span><span style="color: #000000;">&#123;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Main <span style="color: #0033ff; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> p<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> Player<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; p<span style="color: #000066; font-weight: bold;">.</span>playFlv<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;travis_sing.flv&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>p<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&lt;/</span>pre<span style="color: #000066; font-weight: bold;">&gt;</span><br />
<span style="color: #000066; font-weight: bold;">&lt;</span>p style=<span style="color: #990000;">&quot;padding-top:1.4em;&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>Next we have to create the Player<span style="color: #000066; font-weight: bold;">.</span><span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #9900cc; font-weight: bold;">class</span><span style="color: #000066; font-weight: bold;">:&lt;/</span>p<span style="color: #000066; font-weight: bold;">&gt;</span><br />
<span style="color: #000066; font-weight: bold;">&lt;</span>pre <span style="color: #9900cc; font-weight: bold;">class</span>=<span style="color: #990000;">&quot;brush: as3;&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>package<span style="color: #000000;">&#123;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=netconnection%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netconnection.html"><span style="color: #004993;">NetConnection</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=netstream%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstream.html"><span style="color: #004993;">NetStream</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.media</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=video%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:video.html"><span style="color: #004993;">Video</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=timerevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:timerevent.html"><span style="color: #004993;">TimerEvent</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=netstatusevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstatusevent.html"><span style="color: #004993;">NetStatusEvent</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=asyncerrorevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:asyncerrorevent.html"><span style="color: #004993;">AsyncErrorEvent</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.utils</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=timer%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:timer.html"><span style="color: #004993;">Timer</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=shape%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:shape.html"><span style="color: #004993;">Shape</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Player <span style="color: #0033ff; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _video<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=video%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:video.html"><span style="color: #004993;">Video</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _stream<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netstream%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstream.html"><span style="color: #004993;">NetStream</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _duration<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _timer<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=timer%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:timer.html"><span style="color: #004993;">Timer</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _pbFrame<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=shape%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:shape.html"><span style="color: #004993;">Shape</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _pbDuration<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=shape%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:shape.html"><span style="color: #004993;">Shape</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _pbLoaded<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=shape%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:shape.html"><span style="color: #004993;">Shape</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Player<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; _pbFrame = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=shape%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:shape.html"><span style="color: #004993;">Shape</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _pbFrame<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0x000000<span style="color: #000066; font-weight: bold;">,</span> 1<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _pbFrame<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span>0<span style="color: #000066; font-weight: bold;">,</span> 300<span style="color: #000066; font-weight: bold;">,</span> 400<span style="color: #000066; font-weight: bold;">,</span> 7<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//(x, y, width, height)</span><br />
&nbsp; &nbsp; &nbsp; _pbFrame<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_pbFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _pbLoaded = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=shape%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:shape.html"><span style="color: #004993;">Shape</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _pbLoaded<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xAAAAAA<span style="color: #000066; font-weight: bold;">,</span> 1<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _pbLoaded<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span>0<span style="color: #000066; font-weight: bold;">,</span> 301<span style="color: #000066; font-weight: bold;">,</span> 1<span style="color: #000066; font-weight: bold;">,</span> 5<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//(x, y, width, height)</span><br />
&nbsp; &nbsp; &nbsp; _pbLoaded<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_pbLoaded<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _pbDuration = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=shape%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:shape.html"><span style="color: #004993;">Shape</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _pbDuration<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xFFFFFF<span style="color: #000066; font-weight: bold;">,</span> 1<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _pbDuration<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span>0<span style="color: #000066; font-weight: bold;">,</span> 301<span style="color: #000066; font-weight: bold;">,</span> 1<span style="color: #000066; font-weight: bold;">,</span> 5<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//(x, y, width, height)</span><br />
&nbsp; &nbsp; &nbsp; _pbDuration<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_pbDuration<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>&nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; _duration = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; _timer = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=timer%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:timer.html"><span style="color: #004993;">Timer</span></a><span style="color: #000000;">&#40;</span>1000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _timer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=timerevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:timerevent.html"><span style="color: #004993;">TimerEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TIMER</span><span style="color: #000066; font-weight: bold;">,</span> onTimer<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _timer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">start</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> playFlv<span style="color: #000000;">&#40;</span>flvUrl<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; _video = <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"><span style="color: #004993;">Video</span></a><span style="color: #000000;">&#40;</span>400<span style="color: #000066; font-weight: bold;">,</span>300<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> connection<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netconnection%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netconnection.html"><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"><span style="color: #004993;">NetConnection</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; connection<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">connect</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; _stream = <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"><span style="color: #004993;">NetStream</span></a><span style="color: #000000;">&#40;</span>connection<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _stream<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span>flvUrl<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> Client<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; Client<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">onMetaData</span> = <span style="color: #004993;">onMetaData</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _stream<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">client</span> = Client<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _video<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">attachNetStream</span><span style="color: #000000;">&#40;</span>_stream<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; <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"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">CLICK</span><span style="color: #000066; font-weight: bold;">,</span> onVideoClick<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; _stream<span style="color: #000066; font-weight: bold;">.</span><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"><span style="color: #004993;">NetStatusEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">NET_STATUS</span><span style="color: #000066; font-weight: bold;">,</span> onNetStatus<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _stream<span style="color: #000066; font-weight: bold;">.</span><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"><span style="color: #004993;">AsyncErrorEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ASYNC_ERROR</span><span style="color: #000066; font-weight: bold;">,</span> asyncErrorHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_video<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onVideoClick<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; _stream<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">togglePause</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">onMetaData</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; _duration = <span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">.</span>duration<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; _stream<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">pause</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onNetStatus<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=netstatusevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:netstatusevent.html"><span style="color: #004993;">NetStatusEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//trace(&quot;state:&quot;+ e);</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//_video.width = _video.videoWidth;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//_video.height = _video.videoHeight;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onTimer<span style="color: #000000;">&#40;</span>t<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=timerevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:timerevent.html"><span style="color: #004993;">TimerEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> _duration <span style="color: #000066; font-weight: bold;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;</span> 0 <span style="color: #000066; font-weight: bold;">&amp;</span>amp<span style="color: #000066; font-weight: bold;">;&amp;</span>amp<span style="color: #000066; font-weight: bold;">;</span> _stream<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">time</span> <span style="color: #000066; font-weight: bold;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;</span> 0 <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; _pbDuration<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> = <span style="color: #000000;">&#40;</span>_video<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">/</span>_duration<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>_stream<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; _pbLoaded<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> = <span style="color: #000000;">&#40;</span>_video<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">/</span>_stream<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bytesTotal</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>_stream<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bytesLoaded</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> asyncErrorHandler<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=asyncerrorevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:asyncerrorevent.html"><span style="color: #004993;">AsyncErrorEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;asyncErrorHandler:&quot;</span><span style="color: #000066; font-weight: bold;">+</span> e<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>That&#8217;s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2009/08/playing-flv-movies-with-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using flashvars to pass parameter into flash file</title>
		<link>http://www.simra.ch/2009/07/using-flashvars-to-pass-parameter-into-flash-file/</link>
		<comments>http://www.simra.ch/2009/07/using-flashvars-to-pass-parameter-into-flash-file/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 20:11:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.simra.ch/wordpress/?p=193</guid>
		<description><![CDATA[The following little example shows how to pass values into a flash application.

The xhtml code looks like this:
&#60;object &#160;classid=&#34;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&#34; width=&#34;580&#34; height=&#34;650&#34;
codebase=&#34;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
version=6,0,40,0&#34;&#62;
&#60;param name=&#34;src&#34; value=&#34;flash.swf&#34; /&#62;
&#60;embed width=&#34;580&#34; height=&#34;650&#34; src=&#34;flash.swf&#34; flashvars=&#34;para1=value1&#38;para2=value2&#34;&#62;
&#60;/embed&#62;
&#60;/object&#62;
This is how to use the passed values in the flash application:
x = stage.loaderInfo.parameters.para1;
y = stage.loaderInfo.parameters.para2;
]]></description>
			<content:encoded><![CDATA[<p>The following little example shows how to pass values into a flash application.<br />
<span id="more-193"></span><br />
The xhtml code looks like this:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/object.html"><span style="color: #000000; font-weight: bold;">object</span></a> &nbsp;<span style="color: #000066;">classid</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;580&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;650&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">codebase</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#</span><br />
<span style="color: #009900;">version=6,0,40,0&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/param.html"><span style="color: #000000; font-weight: bold;">param</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;src&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;flash.swf&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<span style="color: #009900;">&lt;embed <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;580&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;650&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;flash.swf&quot;</span> flashvars<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;para1=value1&amp;para2=value2&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>embed&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/object.html"><span style="color: #000000; font-weight: bold;">object</span></a>&gt;</span></div></div>
<p>This is how to use the passed values in the flash application:</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #004993;">x</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000066; font-weight: bold;">.</span>para1<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">y</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000066; font-weight: bold;">.</span>para2<span style="color: #000066; font-weight: bold;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2009/07/using-flashvars-to-pass-parameter-into-flash-file/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

