<?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>OrangeWeb. &#187; Flash/Actionscript</title>
	<atom:link href="http://www.web-design-melbourne.net/category/flash-actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.web-design-melbourne.net</link>
	<description>A Little Bit of Orange Never Hurt Anyone</description>
	<lastBuildDate>Tue, 24 Nov 2009 11:19:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Detect The End of FLV (AS2)</title>
		<link>http://www.web-design-melbourne.net/2009/07/29/detect-the-end-of-flv-as2/</link>
		<comments>http://www.web-design-melbourne.net/2009/07/29/detect-the-end-of-flv-as2/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 10:29:40 +0000</pubDate>
		<dc:creator>Michael Raffaele</dc:creator>
				<category><![CDATA[Flash/Actionscript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash 8]]></category>
		<category><![CDATA[flash tutorial]]></category>
		<category><![CDATA[flv]]></category>

		<guid isPermaLink="false">http://www.web-design-melbourne.net/?p=250</guid>
		<description><![CDATA[Since version 8, Flash has continued to include a wicked import video feature which allows anybody to compress AVI&#8217;s to FLV&#8217;s and control the output using a standard web video player format. Also provided are a few different skins for the author to choose from. This component is very quick and useful and above all, [...]]]></description>
			<content:encoded><![CDATA[<p>Since version 8, Flash has continued to include a wicked import video feature which allows anybody to compress AVI&#8217;s to FLV&#8217;s and control the output using a standard web video player format. Also provided are a few different skins for the author to choose from. This component is very quick and useful and above all, almost anyone can use it, not just a <a href="http://www.web-design-melbourne.net/">web designer</a>.</p>
<p>I was recently asked about &#8220;doing something&#8221; after a FLV has finished playing is Flash 8 (Actionscript 2), and I realised, hmmm&#8230;.</p>
<h5>I have never actually needed to do that before.</h5>
<p>So I decided to look into it, turns out it is actually really simple. Just run through the whole importing a video process (making sure it is a &#8220;progressive stream from the webserver&#8221;) and give your video component an instance name; in this case we&#8217;ll call it <em>videoPlayer</em>.</p>
<p>Next, create your new actions layer and add the following code to it:</p>
<div class="code"><span class="code-text">Code:</span><br />
stop();<br />
var listener:Object = new Object();<br />
listener.complete = function(evt:Object):Void {<br />
//DO ACTIONS HERE<br />
}<br />
videoPlayer.addEventListener(&#8221;complete&#8221;, listener);</div>
<p>That&#8217;s it! It&#8217;s that simple and you can make it do whatever you like.</p>
<p>Some more useful things to know are the following:</p>
<div class="code"><span class="code-text">Code:</span><br />
//This code displays the state of the video. E.g stopped<br />
trace(evt.state);</p>
<p>//This code displays entire video&#8217;s length.<br />
trace(evt.playheadTime);</p></div>
<p>Click <a href="http://www.web-design-melbourne.net/wp-content/uploads/2009/07/end-of-flv/" target="_blank">here</a> to view a fully working example or <a href="http://www.web-design-melbourne.net/wp-content/uploads/2009/07/end-of-flv/end-of-flv.rar">here</a> to download it instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.web-design-melbourne.net/2009/07/29/detect-the-end-of-flv-as2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
