<?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>Morrow Studios - personal site of Chris Morrow, Interactive Developer &#187; fla</title>
	<atom:link href="http://www.morrowstudios.com/tag/fla/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.morrowstudios.com</link>
	<description>a place for me to &#60;span class="strike"&#62;show off&#60;/span&#62; &#60;span class="afterStrike"&#62;share my work&#60;/span&#62;&#60;span class="indent"&#62;- Chris Morrow&#60;/span&#62;</description>
	<lastBuildDate>Thu, 14 Jul 2011 21:42:37 +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>Dynamic Tween using Standard AS 2.0 Tween Class</title>
		<link>http://www.morrowstudios.com/2008/08/04/dynamic-tween-using-standard-as-20-tween-class/</link>
		<comments>http://www.morrowstudios.com/2008/08/04/dynamic-tween-using-standard-as-20-tween-class/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 03:42:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[fla]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://www.morrowstudios.com/blog/?p=4</guid>
		<description><![CDATA[I haven&#8217;t been working with the Tween class, and thought I would revisit it and add a looping function to pre-populate an unlimited number of tweens using one tween function. Code is below and you can download the source code here. import mx.transitions.Tween; import mx.transitions.easing.*; // Constants _global.xPos = 20; _global.tweenNum = 1; _global.timeVar = [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t been working with the Tween class, and thought I would revisit it and add a looping function to pre-populate an unlimited number of tweens using one tween function. Code is below and you can download the <a href="/source/tweenClass.zip">source code here.</a></p>
<p>import mx.transitions.Tween;<br />
import mx.transitions.easing.*;</p>
<p>// Constants</p>
<p>_global.xPos = 20;<br />
_global.tweenNum = 1;<br />
_global.timeVar = 1;<br />
_global.timeReduction = .15;</p>
<p>function tweenBall():Void {<br />
var nextDepth:Number = this.getNextHighestDepth();<br />
_root.attachMovie(&#8220;ballClip&#8221;,&#8221;ballClip&#8221;+tweenNum,nextDepth,{_x:Stage.width, _y:200});<br />
_global.xSpacing = _root["ballClip"+tweenNum]._width+20;</p>
<p>// Set tweens for different properties of object animated</p>
<p><span> </span>var tweenXpos:Object = new Tween(_root["ballClip"+tweenNum], &#8220;_x&#8221;, Regular.easeOut, Stage.width, xPos, timeVar, true);</p>
<p><span> </span>var tweenAlpha:Object = new Tween(_root["ballClip"+tweenNum], &#8220;_alpha&#8221;, Regular.easeOut, 0, 100, timeVar, true);</p>
<p><span> </span>tweenXpos.onMotionFinished = function() {</p>
<p><span> </span>if (tweenNum&lt;5) {</p>
<p><span> </span>// set new variables for next tween<br />
_global.tweenNum++;<br />
_global.xPos = xPos+xSpacing;<br />
_global.timeVar = timeVar-timeReduction;</p>
<p>if (timeVar&lt;=0) {<br />
_global.timeVar = .1;<br />
}<br />
tweenBall();<br />
}</p>
<p>};<br />
}</p>
<p>tweenBall();</p>
]]></content:encoded>
			<wfw:commentRss>http://www.morrowstudios.com/2008/08/04/dynamic-tween-using-standard-as-20-tween-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

