<?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>FLEX{er} &#187; Libraries</title>
	<atom:link href="http://www.flexer.info/category/libraries/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexer.info</link>
	<description>flex developers web corner</description>
	<lastBuildDate>Mon, 26 Jul 2010 17:54:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
  <link>http://www.flexer.info</link>
  <url>http://www.flexer.info/favicon.ico</url>
  <title>FLEX{er}</title>
</image>
		<item>
		<title>Two New Adobe Projects Go Open Source &#8211; OSMF &amp; TLF</title>
		<link>http://www.flexer.info/2009/07/24/two-new-adobe-projects-go-open-source-osmf-tlf/</link>
		<comments>http://www.flexer.info/2009/07/24/two-new-adobe-projects-go-open-source-osmf-tlf/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 06:54:39 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[MXML]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[OSMF]]></category>
		<category><![CDATA[TLF]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=1003</guid>
		<description><![CDATA[Adobe release other two projects into the open source world. We are speaking about: Open Source Media Framework (OSMF) and Text Layout Framework (TLF).
Open Source Media Framework was previously known as Strobe, now is a an open framework for building media players for the Flash Platform. Download it from here and for more information about [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F07%2F24%2Ftwo-new-adobe-projects-go-open-source-osmf-tlf%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F07%2F24%2Ftwo-new-adobe-projects-go-open-source-osmf-tlf%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2009/07/24/two-new-adobe-projects-go-open-source-osmf-tlf/&title=Two+New+Adobe+Projects+Go+Open+Source+&#8211;+OSMF+&#038;+TLF&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>Adobe release other two projects into the open source world. We are speaking about: <a href="http://opensource.adobe.com/wiki/display/osmf/Open+Source+Media+Framework" target="_blank">Open Source Media Framework (OSMF)</a> and <a href="http://opensource.adobe.com/wiki/display/tlf/Text+Layout+Framework" target="_blank">Text Layout Framework (TLF)</a>.</p>
<p><strong>Open Source Media Framework</strong> was previously known as Strobe, now is a an open framework for building media players for the Flash Platform. Download it from <a href="http://opensource.adobe.com/wiki/display/osmf/Downloads" target="_blank">here</a> and for more information about building video applications in Adobe Flash CS4 Professional or Adobe Flash Builder, you may wish to visit the <a href="http://www.adobe.com/devnet/video" target="_blank">Video Technology Center on the Adobe Developer Connection</a>. Open Source Media Framework (which can be found here on <a href="http://opensource.adobe.com/wiki/display/osmf/Open+Source+Media+Framework" target="_blank">opensource.adobe.com</a> but also on <a href="http://www.opensourcemediaframework.com" target="_blank">opensourcemediaframework.com</a>) is linked with <a href="http://www.openvideoplayer.com" target="_blank">Open Video Player Initiative</a>. The source code and pluggable components are available under Mozilla Public License.</p>
<p><strong>Text Layout Framework</strong> is a library built on top of the Flash Text Engine (introduced by Flash Player 10 and Adobe AIR 1.5) that makes text an art, bringing all the experience Adobe has in typography into the RIA world.</p>
<p>Mihai Corlan, Platform Evangelist with Adobe, wrote an <a href="http://corlan.org/2009/01/19/how-to-use-text-layout-framework-in-flex-32-or-air-15" target="_blank">article</a> explaining what Text Layout Framework is and how it can be used with Flex 3.2 (in Flex 4 it is part of the framework).</p>
<p>Recently Adobe opened <a href="http://www.adobe.com/devnet/tlf" target="_blank">Text Layout Framework Technology Center</a> which should become a help for developers.</p>
<p>Both projects are great and we are glad that they are now open source.</p>
<p>Some resources&#8230;<br />
<a href="http://opensource.adobe.com/wiki/display/osmf/Open+Source+Media+Framework" target="_blank">http://opensource.adobe.com/wiki/display/osmf/Open+Source+Media+Framework</a><br />
<a href="http://www.opensourcemediaframework.com" target="_blank">http://www.opensourcemediaframework.com</a><br />
<a href="http://opensource.adobe.com/wiki/display/osmf/Downloads" target="_blank">http://opensource.adobe.com/wiki/display/osmf/Downloads</a><br />
<a href="http://opensource.adobe.com/wiki/display/tlf/Text+Layout+Framework" target="_blank">http://opensource.adobe.com/wiki/display/tlf/Text+Layout+Framework</a><br />
<a href="http://www.openvideoplayer.com" target="_blank">http://www.openvideoplayer.com</a><br />
<a href="http://corlan.org/2009/01/19/how-to-use-text-layout-framework-in-flex-32-or-air-15" target="_blank">http://corlan.org/2009/01/19/how-to-use-text-layout-framework-in-flex-32-or-air-15</a><br />
<a href="http://www.adobe.com/devnet/tlf" target="_blank">http://www.adobe.com/devnet/tlf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2009/07/24/two-new-adobe-projects-go-open-source-osmf-tlf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resources Used @ Bootcamps Are Available</title>
		<link>http://www.flexer.info/2009/05/25/resources-used-bootcamps-are-available/</link>
		<comments>http://www.flexer.info/2009/05/25/resources-used-bootcamps-are-available/#comments</comments>
		<pubDate>Mon, 25 May 2009 11:59:39 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex resources]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[examples]]></category>
		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=778</guid>
		<description><![CDATA[First of all the bootcamps were a success if we think about that all tickets were sold out before the Adobe Developer Day started. The resources used at three of bootcamps held at Adobe Developer Day are now available by the evangelists Cornel Creanga and Mihai Corlan on their blogs. 
Using the following links you [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F05%2F25%2Fresources-used-bootcamps-are-available%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F05%2F25%2Fresources-used-bootcamps-are-available%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2009/05/25/resources-used-bootcamps-are-available/&title=Resources+Used+@+Bootcamps+Are+Available&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>First of all the bootcamps were a success if we think about that all tickets were sold out before the <a href="http://www.flexer.info/2009/05/20/adobe-developer-day-bucharest-we-were-there/" target="_blank">Adobe Developer Day</a> started. The resources used at three of bootcamps held at Adobe Developer Day are now available by the evangelists <a href="http://cornelcreanga.com" target="_blank">Cornel Creanga</a> and <a href="http://corlan.org/" target="_blank">Mihai Corlan</a> on their blogs. </p>
<p>Using the following links you can directly download the resources you need: </p>
<ul class="ul">
<li>Introduction to Flex and AIR Bootcamp<br />
<a href="http://corlan.org/bootcamp/AIRBootCamp.zip" target="_blank">http://corlan.org/bootcamp/AIRBootCamp.zip</a><br />
<a href="http://corlan.org/bootcamp/BootCamp_Introduction_to_AIR.pdf" target="_blank">http://corlan.org/bootcamp/BootCamp_Introduction_to_AIR.pdf</a>
</li>
<li>BlazeDS + LCDS Bootcamp Advanced<br />
<a href="http://cornelcreanga.com/docs/bootcamp.zip" target="_blank">http://cornelcreanga.com/docs/bootcamp.zip</a>
</li>
<li>Micro-architecture of Enterprise Applications<br />
<a href="http://corlan.org/bootcamp/MicroArchitecturesProjects.zip" target="_blank">http://corlan.org/bootcamp/MicroArchitecturesProjects.zip</a><br />
<a href="http://corlan.org/bootcamp/MicroArchitecture2.pdf" target="_blank">http://corlan.org/bootcamp/MicroArchitecture2.pdf</a>
</li>
</ul>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2009/05/25/resources-used-bootcamps-are-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tweensy &#8211; Tweening &amp; Effects Library &#8211; Includes Particles Generator Engine</title>
		<link>http://www.flexer.info/2009/05/01/tweensy-tweening-effects-library-includes-particles-generator-engine/</link>
		<comments>http://www.flexer.info/2009/05/01/tweensy-tweening-effects-library-includes-particles-generator-engine/#comments</comments>
		<pubDate>Fri, 01 May 2009 00:32:36 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Tweening]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=704</guid>
		<description><![CDATA[This week I&#8217;ve been searching for a tweening library. Previously I&#8217;ve been using more than one tween library like: TweenMax, TweenLight, Tweener, GTween, Adobe&#8217;s Tween, etc.
But I found about a new tweening library called Tweensy by Shane McCartney on Lost In Actionscript blog.
If you wonder what is new to this tweening library, well&#8230;

A Bitmap rendering [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F05%2F01%2Ftweensy-tweening-effects-library-includes-particles-generator-engine%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F05%2F01%2Ftweensy-tweening-effects-library-includes-particles-generator-engine%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2009/05/01/tweensy-tweening-effects-library-includes-particles-generator-engine/&title=Tweensy+&#8211;+Tweening+&#038;+Effects+Library+&#8211;+Includes+Particles+Generator+Engine&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>This week I&#8217;ve been searching for a tweening library. Previously I&#8217;ve been using more than one tween library like: <a href="http://blog.greensock.com/tweenmaxas3/" target="_blank">TweenMax</a>, <a href="http://blog.greensock.com/tweenliteas3/" target="_blank">TweenLight</a>, <a href="http://code.google.com/p/tweener/" target="_blank">Tweener</a>, <a href="http://www.gskinner.com/libraries/gtween/" target="_blank">GTween</a>, Adobe&#8217;s Tween, etc.</p>
<p><img src="http://www.flexer.info/wp-content/uploads/2009/04/tweensy2.jpg" alt="tweensy2" title="tweensy2" width="350" height="222" align="right" hspace="15" />But I found about a new tweening library called <a href="http://code.google.com/p/tweensy/" target="_blank">Tweensy</a> by Shane McCartney on <a href="http://www.lostinactionscript.com/blog/index.php/2008/08/31/as3-tween-engine-tweensy-preview/" target="_blank">Lost In Actionscript blog</a>.</p>
<p>If you wonder what is new to this tweening library, well&#8230;</p>
<ul class="ul">
<li>A Bitmap rendering feature allowing for Bitmap Effects not easily achieved from the Adobe filter set such as Directional Motion Blur, Liquid Theshold, Directional Displacement and Buldge/Skew Displacement</li>
<li>Particle Emitters to generate smoke, fire, abstract, and magical effects from your motion tweens</li>
<li>Vector shape Tweening</li>
<li>Gradient Tweening</li>
</ul>
<p>I&#8217;ve playing with it a little bit and the particle generation module is working very well. Although the examples provided with the library are for Flash I&#8217;ve been able to generate a fire in Flex, based on an example found in there.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweensyexampleapp_181105678"
			class="flashmovie"
			width="600"
			height="400">
	<param name="movie" value="/wp-content/uploads/2009/04/tweensyexampleapp.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/wp-content/uploads/2009/04/tweensyexampleapp.swf"
			name="fm_tweensyexampleapp_181105678"
			width="600"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>With the particle generator nice effects can be achieved and integrated in different components. For example, a button that will be on fire at rollover and many, many other.</p>
<p>Now that you&#8217;ve seen the fire take a look into the code:</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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:Application xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #ff0000;">&quot;absolute&quot;</span>
    <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;600&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;400&quot;</span>
    creationComplete=<span style="color: #ff0000;">&quot;create()&quot;</span>
    updateComplete=<span style="color: #ff0000;">&quot;update()&quot;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:Canvas id=<span style="color: #ff0000;">&quot;mainCanvas&quot;</span> x=<span style="color: #ff0000;">&quot;0&quot;</span> y=<span style="color: #ff0000;">&quot;0&quot;</span>
        <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;600&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;400&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>mx:UIComponent id=<span style="color: #ff0000;">&quot;myUIComponent&quot;</span> 
            x=<span style="color: #ff0000;">&quot;0&quot;</span> y=<span style="color: #ff0000;">&quot;0&quot;</span>
            <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;600&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;400&quot;</span> <span style="color: #66cc66;">/&gt;</span>
        <span style="color: #66cc66;">&lt;</span>mx:<span style="color: #0066CC;">Button</span> id=<span style="color: #ff0000;">&quot;myButton&quot;</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> y=<span style="color: #ff0000;">&quot;300&quot;</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;120&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>mx:Canvas<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:Script<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>
            <span style="color: #808080; font-style: italic;">// imports</span>
            <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">flashdynamix</span>.<span style="color: #006600;">motion</span>.<span style="color: #006600;">effects</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">ColorEffect</span>;
            <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">flashdynamix</span>.<span style="color: #006600;">motion</span>.<span style="color: #006600;">effects</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">FilterEffect</span>;
            <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">flashdynamix</span>.<span style="color: #006600;">motion</span>.<span style="color: #006600;">extras</span>.<span style="color: #006600;">Emitter</span>;
            <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">flashdynamix</span>.<span style="color: #006600;">motion</span>.<span style="color: #006600;">effects</span>.<span style="color: #006600;">PerlinDisplacementEffect</span>;
            <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">flashdynamix</span>.<span style="color: #006600;">motion</span>.<span style="color: #006600;">layers</span>.<span style="color: #006600;">BitmapLayer</span>;
&nbsp;
            <span style="color: #808080; font-style: italic;">// bitmap layer that will hold and add all effect and</span>
            <span style="color: #808080; font-style: italic;">// filters needed </span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _layer:BitmapLayer;
            <span style="color: #808080; font-style: italic;">// color transformation</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _colorTransform:ColorTransform;
            <span style="color: #808080; font-style: italic;">// displacement effect</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _displacementEffect:PerlinDisplacementEffect;
            <span style="color: #808080; font-style: italic;">// our emitter which will generate particles</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _emitter:Emitter;
            <span style="color: #808080; font-style: italic;">// another two effects</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _filterEffect:FilterEffect;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _colorEffect:ColorEffect;
            <span style="color: #808080; font-style: italic;">// fire particle model</span>
            <span style="color: #808080; font-style: italic;">// emitter will generate particles based on it</span>
            <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;assets/images/fire.png&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _fireParticle:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
            <span style="color: #808080; font-style: italic;">// button labels</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _startFireText:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;Start the fire!&quot;</span>;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _endFireText:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;Stop the fire!&quot;</span>;
&nbsp;
            <span style="color: #808080; font-style: italic;">// create method</span>
            <span style="color: #808080; font-style: italic;">// called before all objects are added to stage</span>
            <span style="color: #808080; font-style: italic;">// stage is not available when this method is called</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> create<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
                myButton.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, startFire<span style="color: #66cc66;">&#41;</span>;
                myButton.<span style="color: #006600;">label</span> = _startFireText;
                <span style="color: #808080; font-style: italic;">// setting up the fire effect but not showing it</span>
                createFire<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>    
&nbsp;
            <span style="color: #808080; font-style: italic;">// update method</span>
            <span style="color: #808080; font-style: italic;">// this will be called when all objects are added to stage</span>
            <span style="color: #808080; font-style: italic;">// stage is available at the moment this method is called</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #808080; font-style: italic;">// setting the quality to low</span>
                <span style="color: #808080; font-style: italic;">// making it higher will overload the processor</span>
                <span style="color: #808080; font-style: italic;">// and because of heavy calculation artefact may appear</span>
                <span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">quality</span> = StageQuality.<span style="color: #006600;">LOW</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #808080; font-style: italic;">// creating the fire</span>
            <span style="color: #808080; font-style: italic;">// setting it up</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createFire<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #808080; font-style: italic;">// width</span>
                <span style="color: #000000; font-weight: bold;">var</span> tW:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">600</span>;
                <span style="color: #808080; font-style: italic;">// height </span>
                <span style="color: #000000; font-weight: bold;">var</span> tH:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">400</span>;
                <span style="color: #808080; font-style: italic;">// scale </span>
                <span style="color: #000000; font-weight: bold;">var</span> tS:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">2</span>;
&nbsp;
                <span style="color: #808080; font-style: italic;">// creating bitmap layer</span>
                _layer = <span style="color: #000000; font-weight: bold;">new</span> BitmapLayer<span style="color: #66cc66;">&#40;</span>tW,tH,tS<span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// creating displacement effect</span>
                _displacementEffect = 
                    <span style="color: #000000; font-weight: bold;">new</span> PerlinDisplacementEffect<span style="color: #66cc66;">&#40;</span>tW<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>,tH<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>,tS,-<span style="color: #cc66cc;">6</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
                _displacementEffect.<span style="color: #006600;">baseX</span> = <span style="color: #cc66cc;">50</span>;
                _displacementEffect.<span style="color: #006600;">baseY</span> = <span style="color: #cc66cc;">40</span>;
                <span style="color: #808080; font-style: italic;">// creating filter effect</span>
                _filterEffect = <span style="color: #000000; font-weight: bold;">new</span> FilterEffect<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> BlurFilter<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span>,<span style="color: #cc66cc;">3</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// creating color effect</span>
                _colorEffect = <span style="color: #000000; font-weight: bold;">new</span> ColorEffect<span style="color: #66cc66;">&#40;</span>
                    <span style="color: #000000; font-weight: bold;">new</span> ColorTransform<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">0.95</span>,-<span style="color: #cc66cc;">20</span>,-<span style="color: #cc66cc;">20</span>,-<span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// adding the above effects to bitmap layer</span>
                _layer.<span style="color: #0066CC;">add</span><span style="color: #66cc66;">&#40;</span>_displacementEffect<span style="color: #66cc66;">&#41;</span>;
                _layer.<span style="color: #0066CC;">add</span><span style="color: #66cc66;">&#40;</span>_filterEffect<span style="color: #66cc66;">&#41;</span>;
                _layer.<span style="color: #0066CC;">add</span><span style="color: #66cc66;">&#40;</span>_colorEffect<span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// creating color transformation</span>
                _colorTransform = <span style="color: #000000; font-weight: bold;">new</span> ColorTransform<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">80</span>,<span style="color: #cc66cc;">30</span>,<span style="color: #cc66cc;">15</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// creating the emitter that will generate particles</span>
                _emitter = <span style="color: #000000; font-weight: bold;">new</span> Emitter<span style="color: #66cc66;">&#40;</span>
                    _fireParticle, <span style="color: #808080; font-style: italic;">// our particle</span>
                    <span style="color: #66cc66;">&#123;</span>
                        rotation: <span style="color: #ff0000;">&quot;-22, 44&quot;</span>, <span style="color: #808080; font-style: italic;">// rotation: starting from -22 deg </span>
                                             <span style="color: #808080; font-style: italic;">// and having an interval of 44 deg</span>
                        scaleX: tS,
                        scaleY: tS
                    <span style="color: #66cc66;">&#125;</span>, <span style="color: #808080; font-style: italic;">// target's properties</span>
                    <span style="color: #cc66cc;">2</span>, <span style="color: #808080; font-style: italic;">// frequency: how many particles are created on each frame</span>
                    <span style="color: #cc66cc;">1</span>, <span style="color: #808080; font-style: italic;">// random: how often the particles are created</span>
                    <span style="color: #ff0000;">&quot;255, 285&quot;</span>, <span style="color: #808080; font-style: italic;">// angle: allowed movement angle</span>
                    <span style="color: #ff0000;">&quot;5, 60&quot;</span>, <span style="color: #808080; font-style: italic;">// distance: allowed distance</span>
                    <span style="color: #cc66cc;">0.5</span>, <span style="color: #808080; font-style: italic;">// speed: time (in sec) to reach destination</span>
                    BlendMode.<span style="color: #0066CC;">ADD</span> <span style="color: #808080; font-style: italic;">// blend mode</span>
                <span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// adding color tranformation</span>
                _emitter.<span style="color: #006600;">transform</span>.<span style="color: #006600;">colorTransform</span> = _colorTransform;
                <span style="color: #808080; font-style: italic;">// setting the emitter's scale</span>
                _emitter.<span style="color: #006600;">scale</span> = <span style="color: #cc66cc;">0.2</span>;
                <span style="color: #808080; font-style: italic;">// setting x &amp; y position</span>
                _emitter.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">300</span> - <span style="color: #cc66cc;">20</span>;
                _emitter.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">150</span>;
                <span style="color: #808080; font-style: italic;">// drawing the bitmap layer</span>
                _layer.<span style="color: #006600;">draw</span><span style="color: #66cc66;">&#40;</span>_emitter.<span style="color: #006600;">holder</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// stoping rendering</span>
                _layer.<span style="color: #006600;">stopRender</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// hidding the effect</span>
                myUIComponent.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">false</span>;
                <span style="color: #808080; font-style: italic;">// adding the bitmap layer to our object holder</span>
                myUIComponent.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_layer<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #808080; font-style: italic;">// starting the fire effect</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> startFire<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>
                <span style="color: #808080; font-style: italic;">// showing the object holder</span>
                myUIComponent.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">true</span>;
                <span style="color: #808080; font-style: italic;">// starting the effect</span>
                _layer.<span style="color: #006600;">startRender</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// events and label set for button</span>
                myButton.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, startFire<span style="color: #66cc66;">&#41;</span>;
                myButton.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, endFire<span style="color: #66cc66;">&#41;</span>;
                myButton.<span style="color: #006600;">label</span> = _endFireText;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #808080; font-style: italic;">// ending the fire effect</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> endFire<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>
                <span style="color: #808080; font-style: italic;">// hiddinh the object holder</span>
                myUIComponent.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">false</span>;
                <span style="color: #808080; font-style: italic;">// stoping the effect</span>
                _layer.<span style="color: #006600;">stopRender</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// events and label for button</span>
                myButton.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, endFire<span style="color: #66cc66;">&#41;</span>;
                myButton.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, startFire<span style="color: #66cc66;">&#41;</span>;
                myButton.<span style="color: #006600;">label</span> = _startFireText;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>mx:Script<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>mx:Application<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

<p>I hope the code is clear and well documented. The values used are taken from the examples found in the Tweensy archive and some of them modified by trial and error to suit my needs. The documentation is ok but it can be better because some details are missing. There is a need to specify that the particle model is a png image &#8211; a flame image (see source file archive).</p>
<p>Anyway, Shane did a great job with this effects library because is more than a tween library.</p>
<p>If you&#8217;re wondering which of the three available Tweensy version I used&#8230; the answer is <strong>Tweensy FX</strong>. Only Tweensy FX contains the particles generation module.</p>
<p><span style="color:red"><strong>Attention:</strong> Do not right click on the application. It seems that there is a problem with this because the browser window freezes a while.</span></p>
<p>As usual source files are available for download.</p>
<p>Resources on Tweensy:<br />
<a href="http://www.lostinactionscript.com/blog/index.php/2008/08/31/as3-tween-engine-tweensy-preview/" target="_blank">Preview article on Lost in Actionscript blog</a><br />
<a href="http://code.google.com/p/tweensy/" target="_blank">Tweensy on Google Code</a><br />
<a href="http://code.google.com/p/tweensy/downloads/list" target="_blank">Download page for Tweensy on Google Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2009/05/01/tweensy-tweening-effects-library-includes-particles-generator-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
