<?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>zedia flash blog &#187; Tweener</title>
	<atom:link href="http://www.zedia.net/tag/tweener/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zedia.net</link>
	<description>Flash, ActionScript, SEO and everything in between</description>
	<lastBuildDate>Thu, 02 Feb 2012 17:58:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>TweenLite, Tweener, GOASAP &#124; Fun with animation packages</title>
		<link>http://www.zedia.net/2008/tweenlite-tweener-goasap-fun-with-animation-packages/</link>
		<comments>http://www.zedia.net/2008/tweenlite-tweener-goasap-fun-with-animation-packages/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 01:06:57 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[GOASAP]]></category>
		<category><![CDATA[Tweener]]></category>
		<category><![CDATA[TweenLite]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2008/tweenlite-tweener-goasap-fun-with-animation-packages/</guid>
		<description><![CDATA[I have been speaking a lot about Tweener these days and for a good reason; it&#8217;s a really good as3 animation library. I can&#8217;t say I have been having trouble with it but I found evidence from different sources that it might not be the best animation package for what I want to do. What [...]]]></description>
			<content:encoded><![CDATA[<p>I have been speaking a lot about <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> these days and for a good reason; it&#8217;s a really good as3 animation library. I can&#8217;t say I have been having trouble with it but I found evidence from different sources that it might not be the best animation package for what I want to do.</p>
<p>What I am doing is mostly websites and in those website I use ActionScript to make everything move; I rarely use the timeline. All of my tweens are at most 1 second long but most of the time they last about 0.5 second. I liked <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> because it was way better than Adobe&#8217;s Tween classes but I found from 2 different sources (<a href="http://blog.greensock.com/tweening-speed-test/" title="Tween engine speed comparison" target="_blank">TweenLite</a>, <a href="http://www.goasap.org/info.html" title="Benchmark As3 Tween" target="_blank">GOASAP</a>) that <a href="http://blog.greensock.com/tweenliteas3" title="TweenLite" target="_blank">TweenLite</a> is faster for small tweens than <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a>. You might know that already, but being fast is one of the most important attribute for me in a tweening engine. Not so much because I use too much animation at the same time but more because that when I start Tweens, I don&#8217;t want them to eat all of the cpu, I want them too leave as much processing power for other stuff like timeline animations, video etc. These is all to say that I am changing all my code from <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> to <a href="http://blog.greensock.com/tweenliteas3" title="TweenLite" target="_blank">Tweenlite</a> (that I had previously changed from Adobe Tween classes to <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a>) because I need the extra speed badly.</p>
<p>Something came up since I started this project. From the maker of the <a href="http://www.mosessupposes.com/Fuse/" title="Fuse kit" target="_blank">Fuse kit</a> comes <a href="http://go.mosessupposes.com/" title="GO AS3 Animation Platform" target="_blank">GOASAP</a>. Which looks very promissing; it&#8217;s  not an animation package per say, it&#8217;s more like animation package building blocks. Since sometime there is a lot of overhead in animation engine for things that you will never use, <a href="http://www.mosessupposes.com/blog/" title="Moses Supposes" target="_blank">Moses Supposes</a> made us all animation library developers. The <a href="http://go.mosessupposes.com/" title="Go AS3 Animation Platform" target="_blank">GOASAP</a> code base is in AS3 and I can&#8217;t wait to start using it. In the mean time I invite you all to go and start developing your own animation code;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2008/tweenlite-tweener-goasap-fun-with-animation-packages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Impacts of Silverlight for a Flash Programmer</title>
		<link>http://www.zedia.net/2007/impacts-of-silverlight-for-a-flash-programmer/</link>
		<comments>http://www.zedia.net/2007/impacts-of-silverlight-for-a-flash-programmer/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 01:50:33 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[Tweener]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2007/impacts-of-silverlight-for-a-flash-programmer/</guid>
		<description><![CDATA[I have been thinking lately about what impacts will Silverlight have on me as a Flash Programmer. I came to the conclusion that it wasn&#8217;t really threatening. It could have been threatening in the sense that it could have made Flash obsolete and make me loose future jobs at the same time. But the thing [...]]]></description>
			<content:encoded><![CDATA[<p>I have been thinking lately about what impacts will Silverlight have on me as a Flash Programmer. I came to the conclusion that it wasn&#8217;t really threatening. It could have been threatening in the sense that it could have made Flash obsolete and make me loose future jobs at the same time. But the thing is, Flash is such a good technology, it&#8217;s been around for a long time, the community supporting it is amazing and Adobe has big plan for it, Silverlight would have to be packed with a lot of feature in order to shake Flash&#8217;s position in the market. I don&#8217;t think it has just that.</p>
<p>It&#8217;s true that videos in Silverlight look good, but now with the moviestar release of the Flash Player, I don&#8217;t think one is better than the other on that characteristic. It&#8217;s nice for programmers who know .net, they can just jump right in and start programming Silverlight applications (maybe with a small learning curve). Good for them, .net programmers are already in demand, now they are going to be even more in demand, their salary is going to increase, so does the cost of building a Silverlight application.</p>
<p>One of the thing that Flash as always suffered was the penetration rate of the Flash Player, as a proof, website using flash 9 are now starting to emerge even if its been more than 6 month since it&#8217;s been release. Silverlight will suffer even more as people are not willing to download anything anymore. Flash as the chance to be adopted by huge website like Youtube and Facebook and has been around for way longer, people trust the Flash brand.</p>
<p>A big advantage Flash has over Silverlight is all the documentation lying around the web. If you want to know how to do something in Flash, just Google it, it&#8217;s that easy. Also open source projects like papervision3d and Tweener are just amazing.</p>
<p>For all these reasons, I don&#8217;t think Flash programmers have to be afraid for their jobs because of Silverlight and that for at least five years. I actually think Silverlight is a good thing; a little competition never hurt anyone, Adobe will have to keep improving Flash which is very good for us.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2007/impacts-of-silverlight-for-a-flash-programmer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tweener and tweening colors</title>
		<link>http://www.zedia.net/2007/tweener-and-tweening-colors/</link>
		<comments>http://www.zedia.net/2007/tweener-and-tweening-colors/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 01:08:57 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[Tweener]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Color]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2007/tweener-and-tweening-colors/</guid>
		<description><![CDATA[I did a previous post about the static method Color.interpolateColor, but at that time, I hadn&#8217;t really tried Tweener yet. Let me tell you this, tweening colors has never been easier than with Tweener. I&#8217;m am going to redo the same example showing you how simple it is to use Tweener instead of Color.interpolateColor form [...]]]></description>
			<content:encoded><![CDATA[<p>I did a <a href="http://www.zedia.net/2007/tweening-colors-using-colorinterpolatecolor/" title="Color.interpolateColor">previous post about the static method Color.interpolateColor</a>, but at that time, I hadn&#8217;t really tried <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> yet. Let me tell you this, tweening colors has never been easier than with <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a>. I&#8217;m am going to redo the same example showing you how simple it is to use <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> instead of <a href="http://www.zedia.net/2007/tweening-colors-using-colorinterpolatecolor/" title="Color.interpolateColor">Color.interpolateColor form the fl.motion.Color package</a>. Here is the code, you just have to paste it on a frame an compile it to swf to make it work (you have to have the <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> classes in your folder or in one of the default class folder).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> simpleSprite:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
simpleSprite.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">100</span>;
simpleSprite.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">100</span>;
simpleSprite.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
simpleSprite.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0xff0000<span style="color: #66cc66;">&#41;</span>;
simpleSprite.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>simpleSprite<span style="color: #66cc66;">&#41;</span>;
simpleSprite.<span style="color: #006600;">buttonMode</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
simpleSprite.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_OVER</span>, makeBlue<span style="color: #66cc66;">&#41;</span>;
simpleSprite.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_OUT</span>, makeRed<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> makeBlue<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
  Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>simpleSprite, <span style="color: #66cc66;">&#123;</span>_color:0x0000ff, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1</span>, transition:<span style="color: #ff0000;">&quot;easeOutQuart&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> makeRed<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
  Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>simpleSprite, <span style="color: #66cc66;">&#123;</span>_color:<span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1</span>, transition:<span style="color: #ff0000;">&quot;easeOutQuart&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>That&#8217;s it. And it does exactly the same thing and probably faster than the Tween classes. Notice that it takes only one line of code to change the color instead of the <a href="http://www.zedia.net/2007/tweening-colors-using-colorinterpolatecolor/" title="Color.interpolateColor">more complex method I used previously</a> . Also you only have to import the <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> classes as opposed to six import statements.</p>
<p>Well that&#8217;s it for today, I&#8217;ll try and investigate on more <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> properties because it just keep surprising me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2007/tweener-and-tweening-colors/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Making a simple button using Tweener and Sprites in AS3</title>
		<link>http://www.zedia.net/2007/making-a-simple-button-using-tweener-and-sprites-in-as3/</link>
		<comments>http://www.zedia.net/2007/making-a-simple-button-using-tweener-and-sprites-in-as3/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 02:46:41 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[Tweener]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2007/making-a-simple-button-using-tweener-and-sprites-in-as3/</guid>
		<description><![CDATA[In a previous tutorial, I showed how to make a simple button using the Tween classes and Sprites. I am going to redo the same tutorial but using Tweener instead. I am not going to re-explain the first step which are all the same than in the previous tutorial; I am just going to speak [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous tutorial, I showed how to make a <a href="http://www.zedia.net/making-a-simple-button-using-tweens-and-sprites-in-actionscript-3/" title="Simple button using Tween classes and Sprites" target="_blank">simple button using the Tween classes and Sprites</a>. I am going to redo the same tutorial but using <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> instead. I am not going to re-explain the first step which are all the same than in the <a href="http://www.zedia.net/making-a-simple-button-using-tweens-and-sprites-in-actionscript-3/" title="Simple button using Tween classes and Sprites" target="_blank">previous tutorial</a>; I am just going to speak about the mouse handler functions.</p>
<p>So here is the new code using <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;">package<span style="color: #66cc66;">&#123;</span>
  <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
  <span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;
  <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
  <span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #66cc66;">*</span>;
  <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> simpleButton <span style="color: #0066CC;">extends</span> Sprite<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> simpleButton<span style="color: #66cc66;">&#40;</span>newLabel:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
      myLabel.<span style="color: #0066CC;">text</span> = newLabel;
      myLabelOver.<span style="color: #0066CC;">text</span> = newLabel;
      myLabelOver.<span style="color: #006600;">alpha</span> = <span style="color: #cc66cc;">0</span>;
      buttonMode = <span style="color: #000000; font-weight: bold;">true</span>;
      mouseChildren = <span style="color: #000000; font-weight: bold;">false</span>;
      addEventListener<span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_OVER</span>, handleMouseOver<span style="color: #66cc66;">&#41;</span>;
      addEventListener<span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_OUT</span>, handleMouseOut<span style="color: #66cc66;">&#41;</span>;
      addEventListener<span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_UP</span>, handleMouseUp<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleMouseOver<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
      Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">Over</span>,<span style="color: #66cc66;">&#123;</span>alpha:<span style="color: #cc66cc;">1</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">0.5</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
      Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">myLabelOver</span>,<span style="color: #66cc66;">&#123;</span>alpha:<span style="color: #cc66cc;">1</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">0.5</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
      Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">myLabel</span>,<span style="color: #66cc66;">&#123;</span>alpha:<span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">0.5</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleMouseOut<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
      Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">Over</span>,<span style="color: #66cc66;">&#123;</span>alpha:<span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">0.5</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
      Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">myLabelOver</span>,<span style="color: #66cc66;">&#123;</span>alpha:<span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">0.5</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
      Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">myLabel</span>,<span style="color: #66cc66;">&#123;</span>alpha:<span style="color: #cc66cc;">1</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">0.5</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleMouseUp<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
    <span style="color: #66cc66;">&#125;</span>
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>The major advantage of <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> in the case of a rollover and a rollout (like most buttons) is that you don&#8217;t have to keep track of previous Tweens in order to stop them. With the Tween classes, if you don&#8217;t do that, you&#8217;re going to end up with strange rollover behaviors.  Also, we had to check if the Tween  existed before trying to stop them which added extra code. <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> handles all that for us which is pretty practical. I spoke some times of the <a href="http://www.mosessupposes.com/Fuse/" title="The Fuse Kit" target="_blank">Fuse Kit</a>; it seems packed with a lot of options, but you can&#8217;t do simple rollovers with it; with <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> you can.</p>
<p>Well I&#8217;m about done with my tutorial on <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> but I think I&#8217;ll do one about using <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> to Tween between two colors, just like <a href="http://www.zedia.net/2007/tweening-colors-using-colorinterpolatecolor/" title="Tutorial about Color.interpolateColor" target="_blank">Color.interpolateColor</a> static method.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2007/making-a-simple-button-using-tweener-and-sprites-in-as3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ActionScript 3 Tweener Basic Tutorial</title>
		<link>http://www.zedia.net/2007/actionscript-3-tweener-basic-tutorial/</link>
		<comments>http://www.zedia.net/2007/actionscript-3-tweener-basic-tutorial/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 22:31:47 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[Tweener]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2007/actionscript-3-tweener-basic-tutorial/</guid>
		<description><![CDATA[On my previous tutorial about how to do Tweens  using ActionScript 3 I used the Tween classes from Adobe. At the time I didn&#8217;t know about Tweener and the Fuse Kit didn&#8217;t have a version in ActionScript 3. I have used Tweener a bit now and I can say that I am starting to like [...]]]></description>
			<content:encoded><![CDATA[<p>On my previous tutorial about how to do <a href="http://www.zedia.net/actionscript-3-tweens-tutorial/" title="ActionScript Tween Tutorial">Tweens  using ActionScript 3</a> I used the Tween classes from <a href="http://www.adobe.com" title="Adobe" target="_blank">Adobe</a>. At the time I didn&#8217;t know about <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> and the <a href="http://www.mosessupposes.com/Fuse/" title="The Fuse Kit" target="_blank">Fuse Kit</a> didn&#8217;t have a version in ActionScript 3. I have used <a href="http://osflash.org/tweener" title="http://osflash.org/tweener" target="_blank">Tweener</a> a bit now and I can say that I am starting to like it a lot.</p>
<p>On a side note, I am now using <a href="http://blog.greensock.com/tweenliteas3/" title="TweenLite" target="_blank">TweenLite</a> instead of Tweener; TweenLite execute faster and is smaller in size. Here is a <a href="http://www.zedia.net/2008/actionscript-3-tweenlite-basic-tutorial/" title="AS3 TweenLite tutorial">tutorial on TweenLite</a>.</p>
<p>For this tutorial I am going to do exactly what I did in the previous tutorial but this time I&#8217;ll use <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a>. The first thing you have to do, as with the Tween classes, is import <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a>, you do it in this way.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #66cc66;">*</span></pre></div></div>

<p><a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> as some easing classes in it but you can also use the easing classes from Flash. One good side of <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> is that it compile perfectly fine in Flex. Tween and easing classes don&#8217;t compile with Flex&#8230; A down side of Tweener is that it adds an additional 8k to your file (as opposed to 2k for Tween classes for a total of 10k).  Ok so now we are ready to go.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>rectangle, <span style="color: #66cc66;">&#123;</span>x:<span style="color: #cc66cc;">300</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">3</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>The &#8220;Tweener.addTween&#8221; part is how you add a Tween, that&#8217;s kinda obvious. &#8220;rectangle&#8221; is the name of the object you want to do a Tween on one of its property (or more). &#8220;x:300&#8243; is the final x position that rectangle will be at. &#8220;time:3&#8243; is the time it will take to get there and &#8220;transition:&#8217;linear&#8217;&#8221; is the easing to use. You see this is already easier to use and to read than the Tween classes. One major change is that you input the starting position of the property. I think this is a good thing since like 90% of the time I have been doing Tween, I want the Tween to start from the current position of the property and you can just set the property before doing the Tween anyway.</p>
<p>The next example was about doing multiple Tweens on the same object but on different properties here is how we did it with the Tween classes:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> myTweenX:Tween = <span style="color: #000000; font-weight: bold;">new</span> Tween<span style="color: #66cc66;">&#40;</span>rectangle, <span style="color: #ff0000;">&quot;x&quot;</span>, Strong.<span style="color: #006600;">easeOut</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> myTweenAlpha:Tween = <span style="color: #000000; font-weight: bold;">new</span> Tween<span style="color: #66cc66;">&#40;</span>rectangle, <span style="color: #ff0000;">&quot;alpha&quot;</span>, Strong.<span style="color: #006600;">easeOut</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> myTweenAlpha:Tween = <span style="color: #000000; font-weight: bold;">new</span> Tween<span style="color: #66cc66;">&#40;</span>rectangle, <span style="color: #ff0000;">&quot;width&quot;</span>, Strong.<span style="color: #006600;">easeOut</span>, rectangle.<span style="color: #0066CC;">width</span>, rectangle.<span style="color: #0066CC;">width</span> + <span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> myTweenAlpha:Tween = <span style="color: #000000; font-weight: bold;">new</span> Tween<span style="color: #66cc66;">&#40;</span>rectangle, <span style="color: #ff0000;">&quot;rotation&quot;</span>, Strong.<span style="color: #006600;">easeOut</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">90</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Here is how you would do that with <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>rectangle, <span style="color: #66cc66;">&#123;</span>x:<span style="color: #cc66cc;">300</span>,alpha:<span style="color: #cc66cc;">1</span>, <span style="color: #0066CC;">width</span>:rectangle.<span style="color: #0066CC;">width</span> + <span style="color: #cc66cc;">300</span>, rotation:<span style="color: #cc66cc;">90</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">3</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>So in one line I did what it used to take me 4 and it easy pretty easy to understand.</p>
<p>Another thing that is really nice with <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> is that it as a delay property. If you want your Tween to start in 1 second you do it in this way:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>rectangle, <span style="color: #66cc66;">&#123;</span>alpha:<span style="color: #cc66cc;">1</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">3</span>, delay:<span style="color: #cc66cc;">1</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>This is practical when you want to do Tweens in sequence (one after the other). With the Tween classes you would do it in this way:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> myTweenX:Tween = <span style="color: #000000; font-weight: bold;">new</span> Tween<span style="color: #66cc66;">&#40;</span>bloc, <span style="color: #ff0000;">&quot;alpha&quot;</span>, Strong.<span style="color: #006600;">easeOut</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
myTweenX.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>TweenEvent.<span style="color: #006600;">MOTION_FINISH</span>, doNextTween<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> doNextTween<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:TweenEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">var</span> myTweenAlpha:Tween = <span style="color: #000000; font-weight: bold;">new</span> Tween<span style="color: #66cc66;">&#40;</span>bloc, <span style="color: #ff0000;">&quot;x&quot;</span>, None.<span style="color: #006600;">easeOut</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
  myTweenX.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>TweenEvent.<span style="color: #006600;">MOTION_FINISH</span>, doNextTween<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>With <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>bloc, <span style="color: #66cc66;">&#123;</span>alpha:<span style="color: #cc66cc;">1</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">3</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>bloc, <span style="color: #66cc66;">&#123;</span>x:<span style="color: #cc66cc;">300</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">3</span>, delay:<span style="color: #cc66cc;">3</span>, transition:<span style="color: #ff0000;">&quot;linear&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>As you can see you use way less code using <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> and it tends to keep all your code for an animation together which will be easier to understand when you come back. Also I have seen some benchmark and <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> seems to be performing better than the Tween classes. So all in all I guess I am just going to ditch the Tween classes and start using <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> from now on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2007/actionscript-3-tweener-basic-tutorial/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Using fl.* packages in Flex and more</title>
		<link>http://www.zedia.net/2007/using-fl-packages-in-flex-and-more/</link>
		<comments>http://www.zedia.net/2007/using-fl-packages-in-flex-and-more/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 02:28:52 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[Tweener]]></category>
		<category><![CDATA[Actionscrip 3]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Blitting]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Montreal Game Summit]]></category>
		<category><![CDATA[Samuel Asher Rivell]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2007/using-fl-packages-in-flex-and-more/</guid>
		<description><![CDATA[Slow days at work means I get to experiment and search the web for new ways to develop. I did a lot of research today on Flex until I stumbled on this presentation on the beedigital blog. It&#8217;s a very nice presentation on how to integrate Flash and Flex in your workflow. That&#8217;s exactly what [...]]]></description>
			<content:encoded><![CDATA[<p>Slow days at work means I get to experiment and search the web for new ways to develop. I did a lot of research today on Flex until I stumbled on this <a href="http://www.adobe.com/devnet/flex/articles/flex_flash_workflow.html" title="Flash CS3 and Flex 3 workflow, how to innovate" target="_blank">presentation</a> on the <a href="http://www.beedigital.net/blog/?p=1578" title="beedigital blog" target="_blank">beedigital blog</a>. It&#8217;s a very nice presentation on how to integrate Flash and Flex in your workflow. That&#8217;s exactly what I wanted. After see it I tried to do some test projects in Flex. Most of the time I do every thing in ActionScript so I thought this wouldn&#8217;t be too difficult. The trouble is that most of the time I also use the Tween and Easing classes from Flash. These classes come in the fl.* package and this package does not compile in Flex. I searched a bit how I could make these classes compile but I only found complicated methods of doing so. I tired also to use the Tween classes from Flex, but in order to use them you have also to include the Flex framework which adds 100k to your project. My simple solution to this problem; using <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> for my tweens. <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> only adds 10k to a swf file compared to the fuse engine (which is not in AS3 yet). It&#8217;s not so bad, it&#8217;s only a 8k difference to the Flash Tween classes (2k). Also using it a bit, I might have misjudged <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> a bit because it works very well. I might in the future redo some example using <a href="http://osflash.org/tweener" title="Tweener" target="_blank">Tweener</a> instead of the Tween classes.</p>
<p>I went on the <a href="http://www.blog.rivello.org/" title="blog of Samuel Asher Rivell" target="_blank">blog of Samuel Asher Rivell</a>, the author of the presentation I spoke of earlier, and found some other interesting things. First there is the <a href="http://www.sijm.ca/en" title="Montreal Game Summit" target="_blank">Montreal Game Summit</a> that&#8217;s going to be held on November 27th and 28th. I live in Montreal so I&#8217;d be pretty happy to go there, at least on the first day. It has some interesting conferences about Flash that I&#8217;d like to see especially the one given by Samuel Asher Rivell on Advertgames.  The second nice thing I found on his blog is the <a href="http://www.blog.rivello.org/?p=94" title="Presentation on Blitting" target="_blank">powerpoint presentation</a> of one of the conference he gave on blitting. I had seen the technique some time on the web but never knowing what it was or how to do it. His presentation is a good introduction to it and I&#8217;d be really interested in hearing his speech about it. There might be more on blitting on this blog since it looks really promising.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2007/using-fl-packages-in-flex-and-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>9-slices scaling, Papervision 3D, Tweener and FlashDevelop</title>
		<link>http://www.zedia.net/2007/9-slices-scaling-papervision-3d-tweener-and-flashdevelop/</link>
		<comments>http://www.zedia.net/2007/9-slices-scaling-papervision-3d-tweener-and-flashdevelop/#comments</comments>
		<pubDate>Wed, 10 Oct 2007 23:00:26 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript 2]]></category>
		<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[Tweener]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2007/9-slices-scaling-papervision-3d-tweener-and-flashdevelop/</guid>
		<description><![CDATA[I am currently working on a website with tons of rounded corners, so I&#8217;m pretty happy they added 9-slices scaling in Flash 8. The only problem I had today, was that I wanted to apply 9-slices scaling on a mask and it happens that you just can&#8217;t. You can&#8217;t do it using ActionScript and you [...]]]></description>
			<content:encoded><![CDATA[<p>I am currently working on a website with tons of rounded corners, so I&#8217;m pretty happy they added 9-slices scaling in Flash 8. The only problem I had today, was that I wanted to apply 9-slices scaling on a mask and it happens that you just can&#8217;t. You can&#8217;t do it using ActionScript and you can&#8217;t use it using the Flash Authoring tool. I don&#8217;t know about flash 9, but I sure hope they will get that to work.</p>
<p>I also stumbled upon something that looks pretty cool: <a href="http://blog.papervision3d.org/" title="Papervision3D" target="_blank">Papervision 3D</a> . The name says it, you can use it to do 3D in flash, haven&#8217;t tried it yet but it looks sweet. And while browsing their website I found a nice <a href="http://blog.papervision3d.org/2007/09/04/mrdoobs-dof-experiments/" title="Papervision3D example" target="_blank">example</a> using <a href="http://code.google.com/p/tweener/" title="Tweener" target="_blank">Tweener</a> which I spoke off recently. They&#8217;ll both deserve more investigation.</p>
<p>Finally, on the same project I am working with all those rounded corner I am using <a href="http://www.flashdevelop.org/community/" title="FlashDevelop" target="_blank">FlashDevelop</a>. I use it because I find the Flash Authoring tool to be really bad (Flash 8 ) for ActionScript. Well I said <a href="http://www.flashdevelop.org/community/" title="FlashDevelop" target="_blank">FlashDevelop</a> was good, but I would rectify what I said, and now say that it is still experimental. I had all sort of problems with it, mostly with the auto-completion tool completing things all the time which I didn&#8217;t ask for . Just thought I&#8217;d share that with you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2007/9-slices-scaling-papervision-3d-tweener-and-flashdevelop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tweener and stuff</title>
		<link>http://www.zedia.net/2007/tweener-and-stuff/</link>
		<comments>http://www.zedia.net/2007/tweener-and-stuff/#comments</comments>
		<pubDate>Sat, 06 Oct 2007 00:49:33 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[Tweener]]></category>
		<category><![CDATA[Actionscrip 2]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Animation]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2007/tweener-and-stuff/</guid>
		<description><![CDATA[Today I found another tweening engine called Tweener. For those who know it, it is the successor of MC Tween. It looks great, it permits you to do tweens on a lot of properties and there is a delay argument, so your code will look cleaner (without all the setTimeout). The down side is still [...]]]></description>
			<content:encoded><![CDATA[<p>Today I found another tweening engine called <a href="http://code.google.com/p/tweener/" title="Tweener animation engine" target="_blank">Tweener</a>. For those who know it, it is the successor of MC Tween. It looks great, it permits you to do tweens on a lot of properties and there is a delay argument, so your code will look cleaner (without all the setTimeout). The down side is still the weight, well it&#8217;s way less than the <a href="http://www.mosessupposes.com/Fuse/" title="Fuse kit" target="_blank">Fuse kit</a> but still; 9.2kb for ActionScript 2 or 10.4 kb for ActionScript 3. This include all of the <a href="http://hosted.zeh.com.br/tweener/docs/en-us/misc/transitions.html" title="Robert Penner's original easing" target="_blank">Robert Penner&#8217;s original easing equations</a> and there is a nice <a href="http://hosted.zeh.com.br/tweener/docs/en-us/misc/transitions.html" title="Robert Penner's original easing" target="_blank">page</a> showing the difference between each of them. I think I will try this code some time soon and I&#8217;ll give you feedback about it.</p>
<p>This weekend, I&#8217;ll try to work on the wordpress template because I think it looks too common and it&#8217;s way too narrow, ActionScript code doesn&#8217;t look like I would like it to. Maybe I&#8217;ll have time to update the <a href="http://www.zedia.net/actionscript-3-tweens-tutorial/" title="ActionScript 3 Tween tutorial">ActionScript 3 Tween tutorial</a> too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2007/tweener-and-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

