<?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>CLOCKWORKBIRD: design, animation, illustration &#187; tutorial</title>
	<atom:link href="http://www.clockworkbird.com/site/category/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clockworkbird.com/site</link>
	<description>Clockworkbird (aka Heather Smith) : Chicago based web designer, developer, animator, illustrator, artist and musician.</description>
	<lastBuildDate>Sat, 21 Jan 2012 23:17:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>AS3: gotoAndPlay when an FLV file is finished playing</title>
		<link>http://www.clockworkbird.com/site/2009/12/08/as3-gotoandplay-when-an-flv-file-is-finished-playing/</link>
		<comments>http://www.clockworkbird.com/site/2009/12/08/as3-gotoandplay-when-an-flv-file-is-finished-playing/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 20:10:18 +0000</pubDate>
		<dc:creator>hey hey</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.clockworkbird.com/site/?p=402</guid>
		<description><![CDATA[THE PROBLEM: So, I recently created a showcase reel that involves several flvs with transitions between. For various reasons, I had to make this a timeline based animation. I was running into a problem with latency because of download times and the flvplayback component. The flvs would play and the transitions between the flvs would [...]]]></description>
			<content:encoded><![CDATA[<p><br/><br />
<em><strong>THE PROBLEM:</strong></em><br />
So, I recently created a showcase reel that involves several flvs with transitions between. For various reasons, I had to make this a timeline based animation. I was running into a problem with latency because of download times and the flvplayback component. The flvs would play and the transitions between the flvs would occur really late.</p>
<p><em><strong>THE SOLUTION:</strong></em><br />
Add an event listener to the flv instance and listen for COMPLETE.</p>
<div style="font-size:12px; padding: 15px; border: 1px solid #ccc;">
<strong>Step 1: </strong>Import your FLV files and place on stage with the correct # of frames between them. (Take the length of your FLV file, multiply by the FPS of your FLA file: that is how many keyframes that particular FLV should have on the timeline.)<br />
<br/><br />
Select File &gt; Import to Stage &gt; Your FLV file name<br />
(There are lots of options when importing FLV files. Select what is appropriate for your project.)<br />
<br/><br />
<strong>Step 2:</strong> Give your flvs instance names ( for the first FLV, I chose the very creative instance name flv1)</p>
<p><strong>Step 3:</strong> Create a new layer, name it labels</p>
<p><strong>Step 4:</strong> Set a keyframe on for the first frame of each flv file and give a label name on the properties tab</p>
<p><strong>Step 5:</strong> Create an actions layer, create a keyframe for the first frame of each flv file (just like you did for the label names)</p>
<p><strong>Step 6:</strong> Import the VideoEvent.<br />
On the first frame of the Actions layer place this code:</p>
<div style="font-size:10px; padding: 15px; ">
import fl.video.VideoEvent;
</div>
<p><strong>Step 7: </strong>Add this code to each key frame, changing the instance name, function name and gotoAndPlay() label name.</p>
<div style="font-size:10px; padding: 15px; ">
flv1.addEventListener(VideoEvent.COMPLETE,videoOver1);</p>
<p>function videoOver1(e:VideoEvent)<br />
{<br />
gotoAndPlay(&#8220;part2&#8243;);<br />
}
</p></div>
</div>
<p><br/><br />
<a href="http://www.clockworkbird.com/site/wp-content/uploads/2009/12/flv_complete_tutorial_smal.mov" rel="shadowbox[];width=800;height=448;"><img src="http://www.pages.drexel.edu/~rwm43/images/512%20Quicktime.png" alt="quicktime" title="View Tutorial" width="50" style="float: left; padding-right: 20px;"/><br />
<h3>VIEW THE TUTORIAL : On FLV Complete gotoAndPlay()</h3>
<p></a><br />
<br/><br/><br />
<a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html" target="_blank"><img src="http://www.cringely.com/wp-content/uploads/adobe_flash.jpg" alt="" title="Read more about the component" style="float: left; padding-right: 20px;"" width="50"/></p>
<h3>READ MORE ABOUT the FLVPlayBack component</h3>
<p></a></p>
<div class="floatClear"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.clockworkbird.com/site/2009/12/08/as3-gotoandplay-when-an-flv-file-is-finished-playing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.clockworkbird.com/site/wp-content/uploads/2009/12/flv_complete_tutorial_smal.mov" length="3620773" type="video/quicktime" />
		</item>
	</channel>
</rss>

