<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;A0QARn46fSp7ImA9WhRVGEU.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429</id><updated>2012-01-18T04:22:27.015-08:00</updated><category term="mobile" /><category term="flash" /><category term="templates" /><category term="flash tools" /><category term="flv format" /><category term="javascript" /><category term="news" /><category term="books" /><category term="SVG" /><category term="community" /><category term="web development" /><category term="adobe" /><category term="open source" /><category term="Apple" /><category term="RIA" /><category term="mashups" /><category term="cs4" /><category term="papervision3d" /><category term="game development" /><category term="downloads" /><category term="polls" /><category term="flash security" /><category term="spark" /><category term="flash clocks" /><category term="video" /><category term="catalyst" /><category term="code" /><category term="actionscript" /><category term="cs5" /><category term="freelance" /><category term="flex builder" /><category term="apollo" /><category term="Android" /><category term="Facebook" /><category term="flex hero" /><category term="photoshop express" /><category term="flex examples" /><category term="tweener" /><category term="math" /><category term="business" /><category term="Flint" /><category term="research" /><category term="photo gallery" /><category term="CSS" /><category term="air" /><category term="photoshop" /><category term="programming" /><category term="UML" /><category term="animations" /><category term="games" /><category term="flash jobs" /><category term="YouTube" /><category term="flash menu" /><category term="web services" /><category term="themes" /><category term="links" /><category term="blog" /><category term="flex exam" /><category term="widgets" /><category term="flex" /><category term="mxml" /><category term="LiveCycle" /><category term="web events" /><category term="diesel" /><category term="certification" /><category term="FXG" /><category term="iPhone" /><category term="blogger" /><category term="data structures" /><category term="tutorials" /><category term="AS3.0" /><category term="free ebooks" /><category term="web2.0" /><category term="hacks" /><category term="Fuse" /><category term="flash builder" /><category term="flashdevelop" /><category term="gumbo" /><category term="twitter" /><category term="flash player" /><category term="HTML" /><category term="guest posting" /><category term="flash templates" /><category term="components" /><category term="fun" /><category term="ColdFusion" /><category term="conferences" /><category term="examples" /><category term="3D flash" /><category term="AS2.0" /><category term="google" /><category term="competitions" /><title>FLANTURE</title><subtitle type="html">[ flash adventure ]</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://flanture.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>281</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/flanture2" /><feedburner:info uri="flanture2" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="license" type="text/html" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" /><feedburner:emailServiceId>flanture2</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;CUEDR3g4cCp7ImA9WhZVFUw.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-5517690453057539273</id><published>2011-05-27T09:24:00.000-07:00</published><updated>2011-05-27T09:27:56.638-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-27T09:27:56.638-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="web2.0" /><category scheme="http://www.blogger.com/atom/ns#" term="community" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="web services" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="links" /><title>Wonderfl Flash Online Community</title><content type="html">This post title is not misspelled. &lt;a href="http://wonderfl.net/" target="_blank"&gt;Wonderfl&lt;/a&gt; is the name of online Flash / ActionScript &lt;a href="http://flanture.blogspot.com/search/label/community" target="_blank"&gt;community&lt;/a&gt; with a collaboration on &lt;a href="http://flanture.blogspot.com/search/label/open%20source" target="_blank"&gt;open source&lt;/a&gt; projects as primary goal.&lt;br /&gt;&lt;br /&gt;Wonderfl is actually more than just a community, it is mature online Flash IDE. You are invited to fork any existing code and continue with adding new features. You can also download to your computer your project version or start new project from scratch. &lt;br /&gt;&lt;br /&gt;If you are more interested in &lt;a href="http://flanture.blogspot.com/search/label/game%20development" target="_blank"&gt;game development&lt;/a&gt; there is special part of the community &lt;a href="http://flash-games.wonderfl.net/" target="_blank"&gt;Wonderlf Flash Games&lt;/a&gt; where you can use Platform features to create, edit or play online Flash games.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-8Zfur2yjebA/Td_Qfz1PNyI/AAAAAAAAAnc/kQHURyLDDzU/s1600/WonderflGames.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 353px; height: 216px;" src="http://4.bp.blogspot.com/-8Zfur2yjebA/Td_Qfz1PNyI/AAAAAAAAAnc/kQHURyLDDzU/s400/WonderflGames.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5611432905634952994" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Wonderfl is created and operated by Japan based &lt;a href="http://www.kayac.com/en/" target="_blank"&gt;Kayac company&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-5517690453057539273?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/nkcG1rLiQu0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/5517690453057539273/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=5517690453057539273" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/5517690453057539273?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/5517690453057539273?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/nkcG1rLiQu0/wonderfl-flash-online-community.html" title="Wonderfl Flash Online Community" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-8Zfur2yjebA/Td_Qfz1PNyI/AAAAAAAAAnc/kQHURyLDDzU/s72-c/WonderflGames.gif" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/05/wonderfl-flash-online-community.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8NQn4_fSp7ImA9WhZWGEk.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-7550379116514071632</id><published>2011-05-19T16:40:00.000-07:00</published><updated>2011-05-19T16:48:13.045-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-19T16:48:13.045-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="blogger" /><category scheme="http://www.blogger.com/atom/ns#" term="blog" /><category scheme="http://www.blogger.com/atom/ns#" term="news" /><category scheme="http://www.blogger.com/atom/ns#" term="polls" /><title>Poll Results: Favorite Flash Platform Topic</title><content type="html">Thank you all who answered previous Poll question: "What would you like to read more on Flanture?". It was multiple choice Poll. I'll make sure future posts correspond to your wishes. &lt;br /&gt;&lt;br /&gt;Here are Poll results.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-vFErq0Ea_mI/TdWr2Rz1wAI/AAAAAAAAAm8/cIcwhiU6kMY/s1600/Poll2Results.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 234px;" src="http://2.bp.blogspot.com/-vFErq0Ea_mI/TdWr2Rz1wAI/AAAAAAAAAm8/cIcwhiU6kMY/s400/Poll2Results.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5608577859941941250" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-7550379116514071632?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/fYCTLBvXTl4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/7550379116514071632/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=7550379116514071632" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/7550379116514071632?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/7550379116514071632?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/fYCTLBvXTl4/poll-results-favorite-flash-platform.html" title="Poll Results: Favorite Flash Platform Topic" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-vFErq0Ea_mI/TdWr2Rz1wAI/AAAAAAAAAm8/cIcwhiU6kMY/s72-c/Poll2Results.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/05/poll-results-favorite-flash-platform.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YDQHw9fyp7ImA9WhZWE0U.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-1506497062517522006</id><published>2011-05-14T08:58:00.000-07:00</published><updated>2011-05-14T09:06:11.267-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-14T09:06:11.267-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="cs5" /><category scheme="http://www.blogger.com/atom/ns#" term="math" /><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="cs4" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="downloads" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Math Quiz / Graphic Timer Example</title><content type="html">Here is small math quiz as simple illustration how &lt;a href="http://flanture.blogspot.com/2011/05/actionscript30-tutorial-all-around.html" target="_blank"&gt;Graphic Timer&lt;/a&gt; can be used. It will look even better within some Flash game ;)&lt;br /&gt;&lt;br /&gt;It is required only few changes to have desired timer thickness and colors. Click on screenshots below to download example file. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.box.net/shared/v7um5cdyja" target="_blank"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 267px;" src="http://3.bp.blogspot.com/-7M5GF8iJhM0/Tc6n45e_9QI/AAAAAAAAAm0/pLoOqYZif3w/s400/FlashMathQuiz.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5606603182068200706" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-1506497062517522006?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/xW_h2SXOulk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/1506497062517522006/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=1506497062517522006" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/1506497062517522006?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/1506497062517522006?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/xW_h2SXOulk/math-quiz-graphic-timer-example.html" title="Math Quiz / Graphic Timer Example" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-7M5GF8iJhM0/Tc6n45e_9QI/AAAAAAAAAm0/pLoOqYZif3w/s72-c/FlashMathQuiz.gif" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/05/math-quiz-graphic-timer-example.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAFRnkyeip7ImA9WhZWEEk.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-1714830683187911120</id><published>2011-05-10T08:13:00.000-07:00</published><updated>2011-05-10T08:18:37.792-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-10T08:18:37.792-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="cs5" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="Facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="cs4" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>ActionScript3.0 Tutorial : All Around Continual Graphic Timer</title><content type="html">This tutorial is requested by Andreas Folkesson.&lt;br /&gt;&lt;br /&gt;First of all if you aren't familiar with my previous post &lt;a href="http://flanture.blogspot.com/2010/10/discrete-versus-continual-graphical-as3.html" target="_blank"&gt;Discrete versus continual graphical AS3 Timer&lt;/a&gt; read it so you can continue with this ActionScript 3.0 tutorial. For his specific project Andreas needed all round graphic continual timer and I thought it's interesting problem so I took the challenge. &lt;br /&gt;&lt;br /&gt;All around timer means that timer graphic is "docked" to all four sides of scene and time is up when timer makes a whole trip around the scene. Take a look at the image.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-tl0qKsaobbA/TclWdghdNuI/AAAAAAAAAms/A8R8GRLlGrU/s1600/AllAroundTimer.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 320px;" src="http://3.bp.blogspot.com/-tl0qKsaobbA/TclWdghdNuI/AAAAAAAAAms/A8R8GRLlGrU/s400/AllAroundTimer.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5605106276185749218" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let's make those backgrounds.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 450px"&gt;&lt;code&gt;// background elements&lt;br /&gt;&lt;br /&gt;// timer background thickness&lt;br /&gt;var thickness:int = 20;&lt;br /&gt;var timerDuration:int = 20;&lt;br /&gt;&lt;br /&gt;// background top&lt;br /&gt;var bTop:Sprite = new Sprite();&lt;br /&gt;bTop.graphics.beginFill(0x33cc33);&lt;br /&gt;bTop.graphics.drawRect(0,0,stage.stageWidth,thickness);&lt;br /&gt;addChild(bTop);&lt;br /&gt;&lt;br /&gt;// background right&lt;br /&gt;var bRight:Sprite = new Sprite();&lt;br /&gt;bRight.graphics.beginFill(0x33cc33);&lt;br /&gt;bRight.graphics.drawRect(stage.stageWidth-thickness,0,thickness,stage.stageHeight);&lt;br /&gt;addChild(bRight);&lt;br /&gt;&lt;br /&gt;// background bottom&lt;br /&gt;var bBottom:Sprite = new Sprite();&lt;br /&gt;bBottom.graphics.beginFill(0x33cc33);&lt;br /&gt;bBottom.graphics.drawRect(0,stage.stageHeight-thickness,stage.stageWidth, thickness);&lt;br /&gt;addChild(bBottom);&lt;br /&gt;&lt;br /&gt;// background left&lt;br /&gt;var bLeft:Sprite = new Sprite();&lt;br /&gt;bLeft.graphics.beginFill(0x33cc33);&lt;br /&gt;bLeft.graphics.drawRect(0,0,thickness, stage.stageHeight);&lt;br /&gt;addChild(bLeft);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;There are two variables you need to pay attention about. First one is "thickness" which is thickness of graphic timer, which is nice thing if you can change it according to your project needs. Second variable is timerDuration and it refers to entire timer (all four sides). &lt;br /&gt;&lt;br /&gt;So how this problem is solved? I used four different timers. Each one starts after previous timer is finished. For this I'm using TimerEvent.TIMER_COMPLETE event listener. Here is rest of the code.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 450px"&gt;&lt;code&gt;// graphic level timer&lt;br /&gt;&lt;br /&gt;function aroundTimer(seconds:int):void&lt;br /&gt;{&lt;br /&gt;    seconds = seconds / 4;&lt;br /&gt;    var t:Timer = new Timer(50, seconds*thickness);&lt;br /&gt;    &lt;br /&gt;    // graphic element&lt;br /&gt;    var w:Number = stage.stageWidth;&lt;br /&gt;    var h:Number = thickness;&lt;br /&gt;    var g:Sprite = new Sprite();    &lt;br /&gt;    addChild(g);&lt;br /&gt;    &lt;br /&gt;    // find percent and draw it!&lt;br /&gt;    t.addEventListener(TimerEvent.TIMER, onTimer);&lt;br /&gt;    function onTimer(evt:Event):void&lt;br /&gt;    {&lt;br /&gt;        var cc:int = evt.target.currentCount;&lt;br /&gt;        var gWidth:Number = (cc * w)/(seconds * thickness);&lt;br /&gt;        g.graphics.beginFill(0x339933);&lt;br /&gt;        g.graphics.drawRect(0, 0, gWidth, h);&lt;br /&gt;    }&lt;br /&gt;    t.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete);&lt;br /&gt;    function onComplete(evt:Event):void&lt;br /&gt;    {&lt;br /&gt;        trace(&amp;quot;top timer end.&amp;quot;);&lt;br /&gt;        timerRight(seconds);&lt;br /&gt;    }&lt;br /&gt;    t.start();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function timerRight(seconds:int):void&lt;br /&gt;{&lt;br /&gt;    var t:Timer = new Timer(50, seconds*thickness);&lt;br /&gt;    &lt;br /&gt;    // graphic element&lt;br /&gt;    var w:Number = thickness;&lt;br /&gt;    var h:Number = stage.stageHeight-thickness;&lt;br /&gt;    var g:Sprite = new Sprite();    &lt;br /&gt;    addChild(g);&lt;br /&gt;    &lt;br /&gt;    // find percent and draw it!&lt;br /&gt;    t.addEventListener(TimerEvent.TIMER, onTimer);&lt;br /&gt;    function onTimer(evt:Event):void&lt;br /&gt;    {&lt;br /&gt;        var cc:int = evt.target.currentCount;&lt;br /&gt;        var gHeight:Number = (cc * h)/(seconds * thickness);&lt;br /&gt;        g.graphics.beginFill(0x339933);&lt;br /&gt;        g.graphics.drawRect(stage.stageWidth-thickness, thickness, w, gHeight);&lt;br /&gt;    }&lt;br /&gt;    t.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete);&lt;br /&gt;    function onComplete(evt:Event):void&lt;br /&gt;    {&lt;br /&gt;        trace(&amp;quot;right timer end.&amp;quot;);&lt;br /&gt;        timerBottom(seconds);&lt;br /&gt;    }&lt;br /&gt;    t.start();    &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function timerBottom(seconds:int):void&lt;br /&gt;{&lt;br /&gt;    var t:Timer = new Timer(50, seconds*thickness);&lt;br /&gt;    &lt;br /&gt;    // graphic element&lt;br /&gt;    var w:Number = stage.stageWidth-thickness;&lt;br /&gt;    var h:Number = thickness;&lt;br /&gt;    var g:Sprite = new Sprite();    &lt;br /&gt;    addChild(g);&lt;br /&gt;    &lt;br /&gt;    // find percent and draw it!&lt;br /&gt;    t.addEventListener(TimerEvent.TIMER, onTimer);&lt;br /&gt;    function onTimer(evt:Event):void&lt;br /&gt;    {&lt;br /&gt;        var cc:int = evt.target.currentCount;&lt;br /&gt;        var gWidth:Number = (cc * w)/(seconds * thickness);&lt;br /&gt;        g.graphics.beginFill(0x339933);&lt;br /&gt;        g.graphics.drawRect(stage.stageWidth-thickness, stage.stageHeight-thickness, -gWidth, h);&lt;br /&gt;    }&lt;br /&gt;    t.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete);&lt;br /&gt;    function onComplete(evt:Event):void&lt;br /&gt;    {&lt;br /&gt;        trace(&amp;quot;bottom timer end.&amp;quot;);&lt;br /&gt;        timerLeft(seconds);&lt;br /&gt;    }&lt;br /&gt;    t.start();    &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function timerLeft(seconds:int):void&lt;br /&gt;{&lt;br /&gt;    var t:Timer = new Timer(50, seconds*thickness);&lt;br /&gt;    &lt;br /&gt;    // graphic element&lt;br /&gt;    var w:Number = thickness;&lt;br /&gt;    var h:Number = stage.stageHeight-thickness;&lt;br /&gt;    var g:Sprite = new Sprite();    &lt;br /&gt;    addChild(g);&lt;br /&gt;    &lt;br /&gt;    // find percent and draw it!&lt;br /&gt;    t.addEventListener(TimerEvent.TIMER, onTimer);&lt;br /&gt;    function onTimer(evt:Event):void&lt;br /&gt;    {&lt;br /&gt;        var cc:int = evt.target.currentCount;&lt;br /&gt;        var gHeight:Number = (cc * h)/(seconds * thickness);&lt;br /&gt;        g.graphics.beginFill(0x339933);&lt;br /&gt;        g.graphics.drawRect(0, stage.stageHeight-thickness, w, -gHeight);&lt;br /&gt;    }&lt;br /&gt;    t.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete);&lt;br /&gt;    function onComplete(evt:Event):void&lt;br /&gt;    {&lt;br /&gt;        trace(&amp;quot;time is up!&amp;quot;);&lt;br /&gt;    }&lt;br /&gt;    t.start();    &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;aroundTimer(timerDuration);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Sure, trace lines can be omitted. When timerLeft finishes you can end your level and start new one. &lt;br /&gt;&lt;br /&gt;I hope this Flash Tutorial will be useful to someone. If you have any questions feel free to ask them here or on &lt;a href="http://facebook.com/flanture" target="_blank"&gt;Facebook discussions page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-1714830683187911120?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/QBDV9MjI1Mc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/1714830683187911120/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=1714830683187911120" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/1714830683187911120?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/1714830683187911120?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/QBDV9MjI1Mc/actionscript30-tutorial-all-around.html" title="ActionScript3.0 Tutorial : All Around Continual Graphic Timer" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-tl0qKsaobbA/TclWdghdNuI/AAAAAAAAAms/A8R8GRLlGrU/s72-c/AllAroundTimer.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/05/actionscript30-tutorial-all-around.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIBQnk4eSp7ImA9WhZQGUw.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-6228228716723830987</id><published>2011-04-27T06:18:00.000-07:00</published><updated>2011-04-27T06:22:33.731-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-27T06:22:33.731-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="video" /><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="news" /><category scheme="http://www.blogger.com/atom/ns#" term="community" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>FITC - Design and Technology Festival in Toronto</title><content type="html">&lt;div style="text-align: justify;"&gt;The place to be next week is Toronto, Canada. Why? Because that's the congregation point for one of the best &lt;a href="http://flanture.blogspot.com/search/label/conferences"&gt;Flash Platform conferences&lt;/a&gt; out there - The Design and Technology Festival, &lt;a href="http://www.fitc.ca/events/presentations/?event=116"&gt;FITC&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Number of events and presentations is huge - over 80 of them. Some of the speakers are: Grant Skinner, Jasse Warden, Robert Peters, Lisa Larson-Kelley, Joshua Noble ...&lt;br /&gt;&lt;br /&gt;In the meantime, those of us who can't attend are spending time on &lt;a href="http://vimeo.com/fitc" target="_blank"&gt;FITC Vimeo videos page&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;center&gt;&lt;object width="400" height="225"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=22269947&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=00adef&amp;amp;fullscreen=1&amp;amp;autoplay=0&amp;amp;loop=0"&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=22269947&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=00adef&amp;amp;fullscreen=1&amp;amp;autoplay=0&amp;amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-6228228716723830987?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/Ev5gyas-hv4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/6228228716723830987/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=6228228716723830987" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/6228228716723830987?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/6228228716723830987?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/Ev5gyas-hv4/fitc-design-and-technology-festival-in.html" title="FITC - Design and Technology Festival in Toronto" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/04/fitc-design-and-technology-festival-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IMR306fCp7ImA9WhZQFEo.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-550145026211440765</id><published>2011-04-22T05:05:00.000-07:00</published><updated>2011-04-22T05:33:06.314-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-22T05:33:06.314-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="YouTube" /><category scheme="http://www.blogger.com/atom/ns#" term="blogger" /><category scheme="http://www.blogger.com/atom/ns#" term="blog" /><category scheme="http://www.blogger.com/atom/ns#" term="Facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="news" /><category scheme="http://www.blogger.com/atom/ns#" term="twitter" /><title>Happy 4th Blogoversary</title><content type="html">Today is 4 years since I started this blog. That's just amazing. I'm one of those people who rarely finishes something I've started (don't judge me, pls) but this blog has survived for 4 long years and not only survived, but improved over the time, contribute some value to the Blogosphere (I hope) and will continue to do so.&lt;br /&gt;&lt;br /&gt;Every time I neglect posting comments and feedback are bringing me back to find new stuff to blog about, so thank you for that. Thank you for &lt;a href="http://feeds.feedburner.com/flanture2"&gt;subscribing to my RSS feed&lt;/a&gt;, all 250+ of you. This number is growing steadily over the time. &lt;br /&gt;&lt;br /&gt;Social media networks also played large part in improving Flanture, first &lt;a href="http://twitter.com/flanture" target="_blank"&gt;Twitter&lt;/a&gt; and from recently you can connect also via &lt;a href="http://www.facebook.com/Flanture" target="_blank"&gt;Facebook page&lt;/a&gt; which is still new but gives us new ways to discuss Flash and web. &lt;br /&gt;&lt;br /&gt;It is always good advice to move your blog in direction your readers need it. Flanture asked and you answered. Here is Poll result from last month:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-WVIeXfUhOKY/TbFvbn-9KAI/AAAAAAAAAmk/q-SRBirZNOE/s1600/PollResults.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 263px; height: 273px;" src="http://3.bp.blogspot.com/-WVIeXfUhOKY/TbFvbn-9KAI/AAAAAAAAAmk/q-SRBirZNOE/s320/PollResults.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5598378332178425858" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thank you for your answers. I have no other option but to announce that Flanture will soon open its &lt;a href="http://www.youtube.com/user/flanture" target="_blank"&gt;YouTube channel&lt;/a&gt; with Flash / ActionScript Tutorials!&lt;br /&gt;&lt;br /&gt;Happy 4th Blogoversary !!!&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-550145026211440765?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/fpKKm90ZcZI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/550145026211440765/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=550145026211440765" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/550145026211440765?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/550145026211440765?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/fpKKm90ZcZI/happy-4th-blogoversary.html" title="Happy 4th Blogoversary" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-WVIeXfUhOKY/TbFvbn-9KAI/AAAAAAAAAmk/q-SRBirZNOE/s72-c/PollResults.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/04/happy-4th-blogoversary.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYCR386cSp7ImA9WhZRGEo.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-2202074787499897067</id><published>2011-04-15T06:23:00.000-07:00</published><updated>2011-04-15T06:29:26.119-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-15T06:29:26.119-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="flash jobs" /><category scheme="http://www.blogger.com/atom/ns#" term="research" /><category scheme="http://www.blogger.com/atom/ns#" term="community" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="polls" /><category scheme="http://www.blogger.com/atom/ns#" term="freelance" /><category scheme="http://www.blogger.com/atom/ns#" term="business" /><title>Average Flash Games Developer</title><content type="html">MochiMedia has conducted survey of Flash games market for 2010. Let me present few key points about average Flash games developer for last year.&lt;br /&gt;&lt;br /&gt;Our average Flash games developer is 'he' in 97% of the cases and only 3% is 'she'. He is around 24 years old and he is most likely from United States. &lt;br /&gt;&lt;br /&gt;Average Flash games developer doesn't create Flash games full time, it's mostly a part time activity and he develops Flash games for 2 years using ActionScript 3.0 and during that time he has developed 3-4 full games. Each of those games got about 200.000 plays during its lifetime. He is most like working by himself.&lt;br /&gt;&lt;br /&gt;Coding and game design are best aspects of his game creation process. Average Flash games developer needs 1-2 months to create single game. He makes up to $500 for that game.&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.slideshare.net/slideshow/embed_code/6768510" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;I've mentioned how our average Flash game developer comes from United States, however, there is evident raise in number of developers from non-western countries comparing to last year:&lt;br /&gt;&lt;br /&gt;o Russia 6% (up 2%)&lt;br /&gt;o Ukraine 4% (up 2%)&lt;br /&gt;o India 4% (up 3%)&lt;br /&gt;o Brazil 3% (up 1%)&lt;br /&gt;o Indonesia 3% (up 1%)&lt;br /&gt;&lt;br /&gt;This is reasonable raise because average $500 for a single game in US/UK maybe is not big deal and may be considered as small bonus, but in Indonesia and India this is good money. Conclusion is that Flash games market is maturing and moving fast from hobby to real business which is good news for both players and developers. &lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-2202074787499897067?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/1QGFD_9cBv8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/2202074787499897067/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=2202074787499897067" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/2202074787499897067?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/2202074787499897067?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/1QGFD_9cBv8/average-flash-games-developer.html" title="Average Flash Games Developer" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/04/average-flash-games-developer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUDQ307fCp7ImA9WhZRF00.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-3111530864537405873</id><published>2011-04-13T07:13:00.000-07:00</published><updated>2011-04-13T07:17:52.304-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-13T07:17:52.304-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="cs5" /><category scheme="http://www.blogger.com/atom/ns#" term="math" /><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="cs4" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Elliptical Movement ActionScript 3.0 Flash Tutorial</title><content type="html">First let's start with something we already done here and extend our knowledge. Take a look at previous posts about circular movement in ActionScript 3.0:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://flanture.blogspot.com/2011/03/how-to-orbit-in-as3.html" target="_blank"&gt;How to orbit in AS&lt;/a&gt;&lt;br /&gt;&lt;a href="http://flanture.blogspot.com/2011/03/making-orbit-trails-in-flash.html" target="_blank"&gt;Making orbit trails in Flash&lt;/a&gt;&lt;br /&gt;&lt;a href="http://flanture.blogspot.com/2011/03/using-drawing-api-for-orbit-like-shapes.html" target="_blank"&gt;Using drawing API for orbit like shapes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Elliptic movement in AS3&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-BUxsZyVJcmg/TaWvzE_JEaI/AAAAAAAAAmc/HzIGPMrL-Z8/s1600/ellipse.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://1.bp.blogspot.com/-BUxsZyVJcmg/TaWvzE_JEaI/AAAAAAAAAmc/HzIGPMrL-Z8/s320/ellipse.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5595071404124475810" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ellipse has center point C(x0,y0) and two fixed points F1 and F2. Distances from F1 and F2 are r1 and r2. You can think of circular movement as special case of ellipse movement where values a and b are equal (a=b).&lt;br /&gt;&lt;br /&gt;Thus, based on previous examples we can write code for finding position of point moving along elliptic curve.&lt;br /&gt;&lt;br /&gt;var posX:Number = planet.x + Math.cos(radians) * a;&lt;br /&gt;var posY:Number = planet.y + Math.sin(radians) * b;&lt;br /&gt;&lt;br /&gt;Instead of single radius parameter in orbit function, ellipse function has two parameters a and b.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 450px"&gt;&lt;code&gt;function ellipse(planet:MovieClip, sat:MovieClip, a:Number, b:Number, speed:Number):void&lt;br /&gt;{&lt;br /&gt;    var currentDegrees:Number = 0;&lt;br /&gt;&lt;br /&gt;    this.addEventListener(Event.ENTER_FRAME, doEveryFrame);&lt;br /&gt;&lt;br /&gt;    function doEveryFrame(event:Event):void&lt;br /&gt;    {&lt;br /&gt;        currentDegrees += speed;&lt;br /&gt;        var radians:Number = getRadians(currentDegrees);&lt;br /&gt;        var posX:Number = planet.x + Math.cos(radians) * a;&lt;br /&gt;        var posY:Number = planet.y + Math.sin(radians) * b;&lt;br /&gt;        sat.x = posX;&lt;br /&gt;        sat.y = posY;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    function getRadians(degrees:Number):Number&lt;br /&gt;    {&lt;br /&gt;        return degrees * Math.PI / 180;&lt;br /&gt;    }    &lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That's all. You can replace orbit function with ellipse one in previous trails examples and it will work perfectly.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-3111530864537405873?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/B8RDMX3m1iE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/3111530864537405873/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=3111530864537405873" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/3111530864537405873?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/3111530864537405873?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/B8RDMX3m1iE/elliptical-movement-actionscript-30.html" title="Elliptical Movement ActionScript 3.0 Flash Tutorial" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-BUxsZyVJcmg/TaWvzE_JEaI/AAAAAAAAAmc/HzIGPMrL-Z8/s72-c/ellipse.jpg" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/04/elliptical-movement-actionscript-30.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8CRHw8eip7ImA9WhZREEw.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-9201547851755793937</id><published>2011-04-05T08:17:00.000-07:00</published><updated>2011-04-05T08:21:05.272-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-05T08:21:05.272-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="fun" /><category scheme="http://www.blogger.com/atom/ns#" term="cs5" /><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="cs4" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Flash AS3 Laser Lab Code</title><content type="html">As promised, here is the code for Laser Lab. In order to run this code successfully, you'll need to have Slider and Color Picker controls in your file library. Everything else is pretty simple, just paste the code into first frame of your FLA file and that's it.&lt;br /&gt;&lt;br /&gt;Original document dimensions are 550x400. That is why loop function exist to avoid drawing over control elements.&lt;br /&gt;&lt;br /&gt;If you extend this example even more, do let me know.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 450px; height: 600px"&gt;&lt;code&gt;// laser effect playground&lt;br /&gt;// author http://flanture.blogspot.com&lt;br /&gt;// based on code by www.eyes-squared.co.uk&lt;br /&gt;// march 2011&lt;br /&gt;&lt;br /&gt;import flash.display.Sprite;&lt;br /&gt;import flash.filters.GlowFilter;&lt;br /&gt;import flash.events.MouseEvent;&lt;br /&gt;import flash.events.Event;&lt;br /&gt;import fl.controls.ColorPicker;&lt;br /&gt;import fl.controls.Slider;&lt;br /&gt;import fl.events.ColorPickerEvent;&lt;br /&gt;import fl.events.SliderEvent;&lt;br /&gt;&lt;br /&gt;// starting values&lt;br /&gt;var baseColor = 0xFFFFFF;&lt;br /&gt;var glowColor = 0xFF0000;&lt;br /&gt;var baseStrength = 3;&lt;br /&gt;var glowStrength = 4;&lt;br /&gt;var glowBlur = 8;&lt;br /&gt;&lt;br /&gt;var sprite:Sprite = new Sprite();&lt;br /&gt;addChild(sprite);&lt;br /&gt;&lt;br /&gt;function updateFilter() {&lt;br /&gt;    var gf:GlowFilter = new GlowFilter(glowColor);&lt;br /&gt;    gf.quality = 3;&lt;br /&gt;    gf.strength = glowStrength;&lt;br /&gt;    gf.blurX = gf.blurY = glowBlur;&lt;br /&gt;    var fils = new Array();&lt;br /&gt;    fils.push(gf);&lt;br /&gt;    &lt;br /&gt;    sprite.filters = fils;&lt;br /&gt;}&lt;br /&gt;updateFilter();&lt;br /&gt;&lt;br /&gt;stage.addEventListener(MouseEvent.MOUSE_DOWN, startFire);&lt;br /&gt;stage.addEventListener(MouseEvent.MOUSE_UP, stopFire);&lt;br /&gt;&lt;br /&gt;function startFire(m:MouseEvent) {&lt;br /&gt;    sprite.graphics.lineStyle(baseStrength, baseColor);&lt;br /&gt;    sprite.graphics.moveTo(mouseX, mouseY);&lt;br /&gt;    addEventListener(Event.ENTER_FRAME, loop);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function stopFire(m:MouseEvent) {&lt;br /&gt;    removeEventListener(Event.ENTER_FRAME, loop);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function loop(e:Event) {&lt;br /&gt;    // avoid drawing on control elements&lt;br /&gt;    if (mouseX &amp;lt; 400) {&lt;br /&gt;        sprite.graphics.lineTo(mouseX, mouseY);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;var cp1:ColorPicker = new ColorPicker();&lt;br /&gt;cp1.width = 100;&lt;br /&gt;cp1.height = 25;&lt;br /&gt;cp1.x = 420;&lt;br /&gt;cp1.y = 30;&lt;br /&gt;addChild(cp1);&lt;br /&gt;&lt;br /&gt;var cp2:ColorPicker = new ColorPicker();&lt;br /&gt;cp2.width = 100;&lt;br /&gt;cp2.height = 25;&lt;br /&gt;cp2.x = 420;&lt;br /&gt;cp2.y = 200;&lt;br /&gt;addChild(cp2);&lt;br /&gt;&lt;br /&gt;var sl1:Slider = new Slider();&lt;br /&gt;sl1.x = 430;&lt;br /&gt;sl1.y = 100;&lt;br /&gt;sl1.liveDragging = true;&lt;br /&gt;sl1.minimum = 1;&lt;br /&gt;sl1.maximum = 10;&lt;br /&gt;sl1.tickInterval = 1;&lt;br /&gt;addChild(sl1);&lt;br /&gt;&lt;br /&gt;var sl2:Slider = new Slider();&lt;br /&gt;sl2.x = 430;&lt;br /&gt;sl2.y = 280;&lt;br /&gt;sl2.liveDragging = true;&lt;br /&gt;sl2.minimum = 1;&lt;br /&gt;sl2.maximum = 10;&lt;br /&gt;sl2.tickInterval = 1;&lt;br /&gt;addChild(sl2);&lt;br /&gt;&lt;br /&gt;var sl3:Slider = new Slider();&lt;br /&gt;sl3.x = 430;&lt;br /&gt;sl3.y = 350;&lt;br /&gt;sl3.liveDragging = true;&lt;br /&gt;sl3.minimum = 1;&lt;br /&gt;sl3.maximum = 7;&lt;br /&gt;sl3.tickInterval = 1;&lt;br /&gt;addChild(sl3);&lt;br /&gt;&lt;br /&gt;cp1.addEventListener(ColorPickerEvent.CHANGE, changeHandler1);&lt;br /&gt;function changeHandler1(event:ColorPickerEvent):void {&lt;br /&gt;    sprite.graphics.clear();&lt;br /&gt;    baseColor = event.target.selectedColor;&lt;br /&gt;}&lt;br /&gt;cp2.addEventListener(ColorPickerEvent.CHANGE, changeHandler2);&lt;br /&gt;function changeHandler2(event:ColorPickerEvent):void {&lt;br /&gt;    glowColor = event.target.selectedColor;&lt;br /&gt;    sprite.graphics.clear();&lt;br /&gt;    updateFilter();&lt;br /&gt;}&lt;br /&gt;sl1.addEventListener(SliderEvent.CHANGE, changeSlider1);&lt;br /&gt;function changeSlider1(event:SliderEvent):void&lt;br /&gt;{&lt;br /&gt;    baseStrength = event.target.value;&lt;br /&gt;    sprite.graphics.clear();&lt;br /&gt;}&lt;br /&gt;sl2.addEventListener(SliderEvent.CHANGE, changeSlider2);&lt;br /&gt;function changeSlider2(event:SliderEvent):void&lt;br /&gt;{&lt;br /&gt;    glowStrength = event.target.value;&lt;br /&gt;    sprite.graphics.clear();&lt;br /&gt;    updateFilter();&lt;br /&gt;}&lt;br /&gt;sl3.addEventListener(SliderEvent.CHANGE, changeSlider3);&lt;br /&gt;function changeSlider3(event:SliderEvent):void&lt;br /&gt;{&lt;br /&gt;    var temp = 1;&lt;br /&gt;    for(var i=0; i&amp;lt;event.target.value; i++){&lt;br /&gt;        temp = 2 * temp;&lt;br /&gt;    }&lt;br /&gt;    glowStrength = temp;&lt;br /&gt;    sprite.graphics.clear();&lt;br /&gt;    updateFilter();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-9201547851755793937?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/0e1W4AJ61xw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/9201547851755793937/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=9201547851755793937" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/9201547851755793937?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/9201547851755793937?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/0e1W4AJ61xw/flash-as3-laser-lab-code.html" title="Flash AS3 Laser Lab Code" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/04/flash-as3-laser-lab-code.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4EQXg-eyp7ImA9WhZSE0Q.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-7545894659340290998</id><published>2011-03-29T03:28:00.000-07:00</published><updated>2011-03-29T03:35:00.653-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-29T03:35:00.653-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="community" /><category scheme="http://www.blogger.com/atom/ns#" term="fun" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="downloads" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Laser Lab - mini Flash app</title><content type="html">Few posts ago I embedded video Tutorial &lt;a href="http://flanture.blogspot.com/2011/03/simple-and-quick-laser-effect-in-flash.html" target="_blank"&gt;Simple and quick laser effect in Flash&lt;/a&gt;. This interesting video tutorial, created by &lt;a href="http://www.eyes-squared.co.uk/" target="_blank"&gt;EyesSquared&lt;/a&gt; made me extend the code with some sliders and color pickers and it seems like small Flash application came out of it.&lt;br /&gt;&lt;br /&gt;Since shareswf and swfcabin are currently unavailable I can't post live version right now. Do you know of any other free swf hosting with hotlinking? &lt;br /&gt;&lt;br /&gt;In meantime, click on image to download Laser Lab App!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.box.net/shared/ph5qvmu519" target="_blank"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 275px;" src="http://1.bp.blogspot.com/-oalbjFjqqug/TZG0tY9kjcI/AAAAAAAAAmE/nBzgil97lVs/s400/LaserLabFlashApp.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5589447304431308226" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You have two color pickers, one for base color and one for glow color. Also, there are three sliders, one for base strength, one for glow strength and one for glow blur amount.&lt;br /&gt;&lt;br /&gt;I'll post application code soon.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-7545894659340290998?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/f3NsjCRZFqc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/7545894659340290998/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=7545894659340290998" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/7545894659340290998?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/7545894659340290998?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/f3NsjCRZFqc/laser-lab-mini-flash-app.html" title="Laser Lab - mini Flash app" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-oalbjFjqqug/TZG0tY9kjcI/AAAAAAAAAmE/nBzgil97lVs/s72-c/LaserLabFlashApp.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/03/laser-lab-mini-flash-app.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQESXY9eSp7ImA9WhZTGUU.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-3192128398008628503</id><published>2011-03-24T09:20:00.000-07:00</published><updated>2011-03-24T09:31:48.861-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-24T09:31:48.861-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="cs5" /><category scheme="http://www.blogger.com/atom/ns#" term="Flint" /><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="cs4" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="downloads" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Olympic Rings Animation Using Flint</title><content type="html">Olympic Rings animation uses &lt;a href="http://flanture.blogspot.com/2011/02/getting-started-with-flint-as3-particle.html" target="_blank"&gt;Flint particles system&lt;/a&gt; (by Richard Lord) and its sparkle effect in combination with &lt;a href="http://flanture.blogspot.com/2011/03/how-to-orbit-in-as3.html" target="_blank"&gt;AS3 orbit function&lt;/a&gt; to make Olympic rings more interesting. Particles colors correspond to rings colors. &lt;br /&gt;&lt;br /&gt;&lt;center&gt;[&lt;a href="http://www.box.net/shared/k6g47pt0qd" target="_blank"&gt;DOWNLOAD SOURCE&lt;/a&gt;]-115kb&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://flanture.blogspot.com" target="_blank"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 189px;" src="http://1.bp.blogspot.com/-UBdHTOV0i8Q/TYtxBxPcujI/AAAAAAAAAl8/ViYvGm3JRY8/s320/OlympicRingsAnimation.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5587684037895174706" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let the games begin!&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-3192128398008628503?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/Fj2p__eIDOE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/3192128398008628503/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=3192128398008628503" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/3192128398008628503?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/3192128398008628503?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/Fj2p__eIDOE/olympic-rings-animation-using-flint.html" title="Olympic Rings Animation Using Flint" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-UBdHTOV0i8Q/TYtxBxPcujI/AAAAAAAAAl8/ViYvGm3JRY8/s72-c/OlympicRingsAnimation.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/03/olympic-rings-animation-using-flint.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcMSXgzfSp7ImA9WhZTF0Q.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-1072952911212481032</id><published>2011-03-22T04:18:00.000-07:00</published><updated>2011-03-22T04:24:48.685-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-22T04:24:48.685-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="math" /><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="downloads" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Using Drawing API for orbit-like shapes in AS3</title><content type="html">Before reading this post, it would be great if you could take a look at related posts:&lt;br /&gt;&lt;br /&gt;- &lt;a href="http://flanture.blogspot.com/2011/03/how-to-orbit-in-as3.html" target="_blank"&gt;How to orbit in AS3&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://flanture.blogspot.com/2011/03/making-orbit-trails-in-flash.html" target="_blank"&gt;Making orbit trails in Flash&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://flanture.blogspot.com/2009/07/as3-drawing-api-examples.html" target="_blank"&gt;AS3 drawing API examples&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://flanture.blogspot.com/2009/09/curves-and-fills-with-as3-drawing-api.html" target="_blank"&gt;Curves and fills with AS3 drawing API&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let's take a look at the completed code:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 450px"&gt;&lt;code&gt;import flash.display.MovieClip;&lt;br /&gt;import flash.events.Event;&lt;br /&gt;import flash.display.Graphics;&lt;br /&gt;&lt;br /&gt;function orbit(planet:MovieClip, sat:MovieClip, radius:Number, speed:Number, &lt;br /&gt;               trailStrength:Number, trailColor:uint):void&lt;br /&gt;{&lt;br /&gt;    var currentDegrees:Number = 0;&lt;br /&gt;    var trail:MovieClip = new MovieClip();&lt;br /&gt;    trail.graphics.lineStyle(trailStrength, trailColor);&lt;br /&gt;    &lt;br /&gt;    var setPosition:Boolean = true;&lt;br /&gt;    &lt;br /&gt;    addChild(trail);&lt;br /&gt;    &lt;br /&gt;    this.addEventListener(Event.ENTER_FRAME, doEveryFrame);&lt;br /&gt;&lt;br /&gt;    function doEveryFrame(event:Event):void&lt;br /&gt;    {&lt;br /&gt;        currentDegrees += speed;&lt;br /&gt;        var radians:Number = getRadians(currentDegrees);&lt;br /&gt;        var posX:Number = planet.x + Math.sin(radians) * radius;&lt;br /&gt;        var posY:Number = planet.y + Math.cos(radians) * radius;&lt;br /&gt;        sat.x = posX;&lt;br /&gt;        sat.y = posY;&lt;br /&gt;        &lt;br /&gt;        // update trail graphics&lt;br /&gt;        if (setPosition) {&lt;br /&gt;            trail.graphics.moveTo(posX, posY);&lt;br /&gt;            setPosition = false;&lt;br /&gt;        }&lt;br /&gt;        trail.graphics.lineTo(sat.x, sat.y);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    function getRadians(degrees:Number):Number&lt;br /&gt;    {&lt;br /&gt;        return degrees * Math.PI / 180;&lt;br /&gt;    }    &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;orbit(planetMC, satMC, 220, -1, 2, 0xffff00);&lt;br /&gt;orbit(planetMC, satMC2, 120, 4, 2, 0xffff00);&lt;br /&gt;orbit(satMC2, moon, 20, -31, 1, 0xffffff);&lt;br /&gt;orbit(satMC, moon2, 20, 12, 1, 0xffffff);&lt;br /&gt;orbit(satMC, moon3, 50, 4, 1, 0xffffff);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is part of the result image.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-4GP2yWWzBXU/TYiFykqpkMI/AAAAAAAAAls/pQwm7fLBVTU/s1600/simpleTrails4.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 274px;" src="http://2.bp.blogspot.com/-4GP2yWWzBXU/TYiFykqpkMI/AAAAAAAAAls/pQwm7fLBVTU/s320/simpleTrails4.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5586862441635614914" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Orbit function is a bit different from same function in How to orbit in AS3 post. First, one more import line is added:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;import flash.display.Graphics;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is needed because we will use drawing properties of display object, in this case - MovieClip.&lt;br /&gt;&lt;br /&gt;So, orbit function has two additional parameters: trailStrength and trailColor.&lt;br /&gt;&lt;br /&gt;Before event listener we have 4 new lines:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;var trail:MovieClip = new MovieClip();&lt;br /&gt;trail.graphics.lineStyle(trailStrength, trailColor);&lt;br /&gt;var setPosition:Boolean = true;&lt;br /&gt;addChild(trail);&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;First we define new MovieClip and we set lineStyle using our two new parameters. We add that MovieClip to stage using addChild.&lt;br /&gt;&lt;br /&gt;Now what is setPosition Boolean value? In this particular example, objects for 'planets' and 'moons' are randomly placed on Stage and when movie starts, drawing begins from those starting position, which is bad because it breaks image symmetry. That's why I use this Boolean value to move 'drawing pen' to right position in first iteration of event listener with:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;trail.graphics.moveTo(posX, posY);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After this move, setPosition becomes false and move is never executed again. Only remains to draw new line with:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;trail.graphics.lineTo(sat.x, sat.y);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see from code above, orbit function calls now have 6 parameters and last two are trial line width and trail line color.&lt;br /&gt;&lt;br /&gt;[&lt;a href="http://www.box.net/shared/yiq5bag6d0" target="_blank"&gt;DOWNLOAD SOURCE&lt;/a&gt;]&lt;br /&gt;&lt;br /&gt;Here are few more images created using this technique.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-bq2iqDY_ryU/TYiGGJXyI4I/AAAAAAAAAl0/no0ghAKDKKQ/s1600/OrbitLikeShapesAS3.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 106px;" src="http://1.bp.blogspot.com/-bq2iqDY_ryU/TYiGGJXyI4I/AAAAAAAAAl0/no0ghAKDKKQ/s320/OrbitLikeShapesAS3.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5586862777906111362" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Have some of your own? Let me know.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-1072952911212481032?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/xhfND99MnLQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/1072952911212481032/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=1072952911212481032" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/1072952911212481032?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/1072952911212481032?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/xhfND99MnLQ/using-drawing-api-for-orbit-like-shapes.html" title="Using Drawing API for orbit-like shapes in AS3" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-4GP2yWWzBXU/TYiFykqpkMI/AAAAAAAAAls/pQwm7fLBVTU/s72-c/simpleTrails4.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/03/using-drawing-api-for-orbit-like-shapes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUAQHc5fip7ImA9WhZTFEs.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-4755989274784665056</id><published>2011-03-18T08:58:00.000-07:00</published><updated>2011-03-18T09:04:01.926-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-18T09:04:01.926-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Making Orbit Trails in Flash</title><content type="html">Let's continue with previous 'orbit' tutorial. In order to create new 'planetary system' just add single orbit function call:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;orbit(planetMovieClip, satelliteMovieClip, _distance, _speed);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will make satelliteMovieClip orbit around planetMovieClip at distance _distance with speed _speed. &lt;br /&gt;&lt;br /&gt;Further you can create another smaller satellite to orbit around satelliteMovieClip, etc ... This system doesn't have any gravity variables, just plain circular movement.&lt;br /&gt;&lt;br /&gt;Now, to create simple trails, insert new movie clip, any image will do, but for start, make something simple, like 4 pixels radius white circle. Enter 'trailMC' as linkage name and add next code:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 450px"&gt;&lt;br /&gt;&lt;code&gt;// create trail movie clip&lt;br /&gt;var mc:trailMC = new trailMC();&lt;br /&gt;mc.x = sat.x;&lt;br /&gt;mc.y = sat.y;&lt;br /&gt;addChild(mc);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This code should go at the bottom of doEveryFrame function. Take a look at result file image:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-SkX7NpHa-mE/TYOBqTLYcLI/AAAAAAAAAlc/JN-4zG-R25Y/s1600/simpleTrails.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 300px; height: 300px;" src="http://3.bp.blogspot.com/-SkX7NpHa-mE/TYOBqTLYcLI/AAAAAAAAAlc/JN-4zG-R25Y/s320/simpleTrails.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5585450526572048562" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you can see, if you make star, planets and moons movie clips have alpha = zero, then you get easy to use shapes generator ... or something like that.&lt;br /&gt;&lt;br /&gt;Since trails movie clip can be anything you think of, you can see how powerful this technique can be. &lt;br /&gt;&lt;br /&gt;If drawing shapes it's not your goal and rather you need just trails, you can make them disappear after a while. One way to do it is to use next code inside trailMC (or use Timer class):&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 450px"&gt;&lt;br /&gt;&lt;code&gt;import flash.events.Event;&lt;br /&gt;&lt;br /&gt;this.addEventListener(Event.ENTER_FRAME, onFrame);&lt;br /&gt;&lt;br /&gt;function onFrame(evt:Event):void&lt;br /&gt;{&lt;br /&gt;    if (alpha &amp;gt; 0) &lt;br /&gt;    {&lt;br /&gt;        alpha -= 0.05;&lt;br /&gt;    } else {&lt;br /&gt;        this.removeEventListener(Event.ENTER_FRAME, onFrame);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-TUEAo2PBWVo/TYOByKAMAhI/AAAAAAAAAlk/QL_sSazjbqU/s1600/simpleTrails2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 300px; height: 210px;" src="http://2.bp.blogspot.com/-TUEAo2PBWVo/TYOByKAMAhI/AAAAAAAAAlk/QL_sSazjbqU/s320/simpleTrails2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5585450661548130834" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In next post I'll show you how to use drawing API instead of movie clips for making orbit trails.&lt;br /&gt;&lt;br /&gt;Thanks for reading.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-4755989274784665056?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/_Y56jrknAbM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/4755989274784665056/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=4755989274784665056" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/4755989274784665056?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/4755989274784665056?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/_Y56jrknAbM/making-orbit-trails-in-flash.html" title="Making Orbit Trails in Flash" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-SkX7NpHa-mE/TYOBqTLYcLI/AAAAAAAAAlc/JN-4zG-R25Y/s72-c/simpleTrails.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/03/making-orbit-trails-in-flash.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIBRXs4fCp7ImA9WhZTEko.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-6308566873009554385</id><published>2011-03-16T05:24:00.000-07:00</published><updated>2011-03-16T05:29:14.534-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-16T05:29:14.534-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="math" /><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="downloads" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>How To Orbit In AS3</title><content type="html">Making some display object orbit around some other display object in ActionScript3.0 is easy. &lt;br /&gt;&lt;br /&gt;Here is basic orbit function where all the magic happens:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 450px"&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function orbit(planet:MovieClip, sat:MovieClip, radius:Number, speed:Number):void&lt;br /&gt;{&lt;br /&gt;    var currentDegrees:Number = 0;&lt;br /&gt;&lt;br /&gt;    this.addEventListener(Event.ENTER_FRAME, doEveryFrame);&lt;br /&gt;&lt;br /&gt;    function doEveryFrame(event:Event):void&lt;br /&gt;    {&lt;br /&gt;        currentDegrees += speed;&lt;br /&gt;        var radians:Number = getRadians(currentDegrees);&lt;br /&gt;        var posX:Number = planet.x + Math.sin(radians) * radius;&lt;br /&gt;        var posY:Number = planet.y + Math.cos(radians) * radius;&lt;br /&gt;        sat.x = posX;&lt;br /&gt;        sat.y = posY;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    function getRadians(degrees:Number):Number&lt;br /&gt;    {&lt;br /&gt;        return degrees * Math.PI / 180;&lt;br /&gt;    }    &lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Function parameters:&lt;br /&gt;&lt;br /&gt;planet - MovieClip around which another MovieClip is orbiting&lt;br /&gt;sat (satellite) - MovieClip which orbits&lt;br /&gt;radius - distance from satellite to planet&lt;br /&gt;speed - orbit speed (can be positive or negative value)&lt;br /&gt;&lt;br /&gt;Orbiting direction depends on speed value. Positive speed value will move satellite in counter-clockwise direction and negative speed value will move satellite in clockwise direction.&lt;br /&gt;&lt;br /&gt;Advanced approach can use satellites as new planets, just as in star system you can have star in a center, some planets orbiting around star and than you can add moons around those planets orbiting with different speed and on different distances from planets.&lt;br /&gt;&lt;br /&gt;Click on image to download example.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.box.net/shared/r8aijrtisx" target="_blank"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 199px;" src="http://4.bp.blogspot.com/-f5-GcUlS0hA/TYCsKWHUrCI/AAAAAAAAAlU/RPwM8M9K5z8/s320/orbitTestExample1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5584652831674379298" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-6308566873009554385?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/DhmkIztYphU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/6308566873009554385/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=6308566873009554385" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/6308566873009554385?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/6308566873009554385?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/DhmkIztYphU/how-to-orbit-in-as3.html" title="How To Orbit In AS3" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-f5-GcUlS0hA/TYCsKWHUrCI/AAAAAAAAAlU/RPwM8M9K5z8/s72-c/orbitTestExample1.jpg" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/03/how-to-orbit-in-as3.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4FSXszfSp7ImA9Wx9aF0o.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-8759295412512629550</id><published>2011-03-10T07:57:00.000-08:00</published><updated>2011-03-10T08:01:58.585-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-10T08:01:58.585-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="video" /><category scheme="http://www.blogger.com/atom/ns#" term="cs4" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><category scheme="http://www.blogger.com/atom/ns#" term="cs5" /><title>Simple and Quick Laser Effect in Flash Using ActionScript 3.0 Video</title><content type="html">This 6 minutes video from PointClickWin will show you how to create simple but effective laser effect in Flash using AS3. &lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;object width="480" height="390"&gt;&lt;param name="movie" value="http://www.youtube.com/v/i2AaV6OAX28?fs=1&amp;amp;hl=en_US&amp;amp;rel=0"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/i2AaV6OAX28?fs=1&amp;amp;hl=en_US&amp;amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="390"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-8759295412512629550?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/0TRb_2f1M5Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/8759295412512629550/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=8759295412512629550" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/8759295412512629550?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/8759295412512629550?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/0TRb_2f1M5Q/simple-and-quick-laser-effect-in-flash.html" title="Simple and Quick Laser Effect in Flash Using ActionScript 3.0 Video" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/03/simple-and-quick-laser-effect-in-flash.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8BRX4yfCp7ImA9Wx9aFko.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-6669946522570230064</id><published>2011-03-09T04:19:00.000-08:00</published><updated>2011-03-09T04:30:54.094-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-09T04:30:54.094-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="SVG" /><category scheme="http://www.blogger.com/atom/ns#" term="news" /><category scheme="http://www.blogger.com/atom/ns#" term="RIA" /><category scheme="http://www.blogger.com/atom/ns#" term="CSS" /><category scheme="http://www.blogger.com/atom/ns#" term="adobe" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><category scheme="http://www.blogger.com/atom/ns#" term="cs5" /><category scheme="http://www.blogger.com/atom/ns#" term="HTML" /><title>Wallaby - FLA to HTML5 conversion tool</title><content type="html">Adobe has released first early version of &lt;a href="http://labs.adobe.com/wiki/index.php/Wallaby" target="_blank"&gt;Wallaby&lt;/a&gt;, FLA to HTML5 conversion tool. Only CS5 FLA files are supported. There is no support for 3D transforms, blend modes, ActionScript, components, filters, sound, video and few more features.&lt;br /&gt;&lt;br /&gt;Conversion result is HTML, JavaScript, CSS3 and SVG.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-dc78_ULgOEM/TXdyOq1zwXI/AAAAAAAAAlI/cPlpuOcDNG0/s1600/wallaby.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 194px;" src="http://3.bp.blogspot.com/-dc78_ULgOEM/TXdyOq1zwXI/AAAAAAAAAlI/cPlpuOcDNG0/s320/wallaby.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5582055859492733298" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-6669946522570230064?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/G9rHGWrzNXM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/6669946522570230064/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=6669946522570230064" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/6669946522570230064?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/6669946522570230064?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/G9rHGWrzNXM/wallaby-fla-to-html5-conversion-tool.html" title="Wallaby - FLA to HTML5 conversion tool" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-dc78_ULgOEM/TXdyOq1zwXI/AAAAAAAAAlI/cPlpuOcDNG0/s72-c/wallaby.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/03/wallaby-fla-to-html5-conversion-tool.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QGRXk_eCp7ImA9Wx9bGU0.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-2816260782439459610</id><published>2011-02-28T06:55:00.000-08:00</published><updated>2011-02-28T07:02:04.740-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-28T07:02:04.740-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="3D flash" /><category scheme="http://www.blogger.com/atom/ns#" term="community" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="Flint" /><category scheme="http://www.blogger.com/atom/ns#" term="downloads" /><title>Flint Particles v3.0 actions cheatsheet</title><content type="html">Single PDF page of Flint Particles v3.0 actions. Black color for both 2D and 3D actions, blue color for only 2D actions and parameters and green color for only 3D actions and parameters.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.box.net/shared/yftzvzxhvd" target="_blank"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 300px; height: 213px;" src="http://4.bp.blogspot.com/-YwiAj7YWcyc/TWu4MFsuYJI/AAAAAAAAAkU/Z3TxIHaADlA/s320/flintcheatsheet.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5578755081256198290" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(click on image to download)&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-2816260782439459610?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/C2pBr2TLwlk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/2816260782439459610/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=2816260782439459610" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/2816260782439459610?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/2816260782439459610?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/C2pBr2TLwlk/flint-particles-v30-actions-cheatsheet.html" title="Flint Particles v3.0 actions cheatsheet" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-YwiAj7YWcyc/TWu4MFsuYJI/AAAAAAAAAkU/Z3TxIHaADlA/s72-c/flintcheatsheet.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/02/flint-particles-v30-actions-cheatsheet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYCSXw7cSp7ImA9Wx9bEUw.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-7465946294975210873</id><published>2011-02-19T02:55:00.000-08:00</published><updated>2011-02-19T02:59:28.209-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-19T02:59:28.209-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Quick update on select tool</title><content type="html">Just a quick update on &lt;a href="http://flanture.blogspot.com/2010/08/windows-like-select-tool-in-flash.html" target="_blank"&gt;'select tool'&lt;/a&gt;. You can now use some keyboard keys to perform additional actions. After selection is made use arrow keys to move selected objects around, 10 px per click. Also backspace and delete keys can be used to remove objects from stage.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" name="flashplayer" src="http://www.shareswf.com/media/games/swf/9477.swf" quality="high" swliveconnect="true" allowscriptaccess="samedomain" width="500" height="400"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;Plans. Some kind of generalization will be done, so assets can be loaded via XML. Application will have 3 panels: main panel for displaying purposes, items panel for choosing display objects with drag and drop ability and command panel where actions are defined like save as jpg, export as something, update view and similar.&lt;br /&gt;&lt;br /&gt;Purpose. Unknown.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-7465946294975210873?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/lP6c5w7liJU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/7465946294975210873/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=7465946294975210873" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/7465946294975210873?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/7465946294975210873?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/lP6c5w7liJU/quick-update-on-select-tool.html" title="Quick update on select tool" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/02/quick-update-on-select-tool.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcNQX85cSp7ImA9Wx9UEks.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-8005857524342912192</id><published>2011-02-09T06:40:00.000-08:00</published><updated>2011-02-09T06:51:30.129-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-09T06:51:30.129-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="community" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="flash tools" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="Flint" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Dissecting Flint 2D Grass Example</title><content type="html">&lt;a href="http://flintparticles.org/" target="_blank"&gt;Flint particles system&lt;/a&gt; is pretty awesome, but for beginners it's very hard to understand entire library and use it easily. This is why I decided to dissect one of the examples, &lt;a href="http://flintparticles.org/examples/grass" target="_blank"&gt;2D Grass example&lt;/a&gt;. Take a look at Flash version of the code. There is only 25 lines of code and 9 of them are import statements. Make sure you have downloaded and extracted Flint source code, I'll make reference to it later during this tutorial. &lt;br /&gt;&lt;br /&gt;First, we place 2D emitter on stage with position x = 250 and y = 400. You can first move this emitter slightly up with:&lt;br /&gt;&lt;br /&gt;emitter.y = 200;&lt;br /&gt;&lt;br /&gt;Instead of 100 particles, we will add 200 with:&lt;br /&gt;&lt;br /&gt;emitter.counter = new Blast( 200 );&lt;br /&gt;&lt;br /&gt;Instead of Blast counter, you can try another one like KeyDownCounter, Pulse, SineCounter or TimePeriod which uses easing equations for emitting particles in predefined period of time. Check docs for full list at org\flintparticles\common\counters.&lt;br /&gt;&lt;br /&gt;Next we have four Initializers. First one is 2D Position Initializer with DiskZone in point (0,0) and radius 40. DiskZone is circular shape which can have third parameter inner radius, so DiskZone can place particles in doughnut shape also, but if third parameter is omitted, particles are placed inside circle like in this example.&lt;br /&gt;&lt;br /&gt;Second used Initializer is Velocity. This one defines velocity for all particles. As its parameter it uses one of Flint zones. There are several zone definitions you can use like DiscZone, LineZone, Zone2D. Check entire list in docs: org\flintparticles\twoD\zones.&lt;br /&gt;&lt;br /&gt;Grass example uses DiscSectorZone with definition:&lt;br /&gt;&lt;br /&gt;DiscSectorZone( center:Point = null, outerRadius:Number = 0, innerRadius:Number = 0, minAngle:Number = 0, maxAngle:Number = 0 )&lt;br /&gt;&lt;br /&gt;Parameter are pretty straightforward. Change those parameters to:&lt;br /&gt;&lt;br /&gt;new DiscSectorZone( new Point( 0, 50 ), 80, 75, -9 * Math.PI / 16, -7 * Math.PI / 16 )&lt;br /&gt;&lt;br /&gt;Next image shows result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_uwXDfjmWSjM/TVKodbYg5GI/AAAAAAAAAj8/6ZvF_Jz2JSE/s1600/FlintGrass1.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 174px;" src="http://2.bp.blogspot.com/_uwXDfjmWSjM/TVKodbYg5GI/AAAAAAAAAj8/6ZvF_Jz2JSE/s320/FlintGrass1.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5571700912530973794" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Third Initializer is color. I wanted to change current situation and start with different colors. Changed line is:&lt;br /&gt;&lt;br /&gt;emitter.addInitializer( new ColorInit( 0x66666600, 0x99999900 ) );&lt;br /&gt;&lt;br /&gt;Fourth Initializer is easy to understand, it is particles Lifetime. If you increase it to 8, you'll get:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_uwXDfjmWSjM/TVKoqCGfasI/AAAAAAAAAkE/31Nt--lyYfc/s1600/FlintGrass2.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 190px;" src="http://4.bp.blogspot.com/_uwXDfjmWSjM/TVKoqCGfasI/AAAAAAAAAkE/31Nt--lyYfc/s320/FlintGrass2.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5571701129082792642" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Flint power and diversity is in its actions. Library has almost 40 different actions in 2D space. Some of them are: Accelerate, CollisionZone, MouseGravity, RandomDrift and ones used in Grass example Move, Age and ScaleImage. Check entire list at org\flintparticles\twoD\actions. We will change two actions. &lt;br /&gt;&lt;br /&gt;emitter.addAction( new ScaleImage( 3, 1 ) );&lt;br /&gt;emitter.addAction( new Accelerate( 0, 6 ) );&lt;br /&gt;&lt;br /&gt;Next image shows result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_uwXDfjmWSjM/TVKo0OmhV5I/AAAAAAAAAkM/IWqrreZwCu0/s1600/FlintGrass3.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 164px;" src="http://2.bp.blogspot.com/_uwXDfjmWSjM/TVKo0OmhV5I/AAAAAAAAAkM/IWqrreZwCu0/s320/FlintGrass3.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5571701304237053842" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;By now you have good insight into how Flint works. You should probably use some other examples both 2D and 3D and change few parameters to get used to library before you are brave enough to try to write your own particles code using Flint.&lt;br /&gt;&lt;br /&gt;Flint library is released under &lt;a href="http://www.opensource.org/licenses/mit-license.php" target="_blank"&gt;MIT license&lt;/a&gt; by &lt;a href="http://www.richardlord.net/" target="_blank"&gt;Richard Lord&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-8005857524342912192?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/EBS96EKlFos" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/8005857524342912192/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=8005857524342912192" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/8005857524342912192?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/8005857524342912192?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/EBS96EKlFos/dissecting-flint-2d-grass-example.html" title="Dissecting Flint 2D Grass Example" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_uwXDfjmWSjM/TVKodbYg5GI/AAAAAAAAAj8/6ZvF_Jz2JSE/s72-c/FlintGrass1.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/02/dissecting-flint-2d-grass-example.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UDSXw7fSp7ImA9Wx9VGEg.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-5679687201547537068</id><published>2011-02-04T14:35:00.000-08:00</published><updated>2011-02-04T14:41:18.205-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-04T14:41:18.205-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="Flint" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Getting Started With Flint AS3 Particle System</title><content type="html">Flint is very mature particle system written in AS3. Project has started back in 2008 by &lt;a href="http://www.richardlord.net/blog" target="_blank"&gt;Richard Lord&lt;/a&gt;. Few days ago on 20th January, version 3.0.0 is released. Big change is that new version targets only Flash Player 10 and beyond.&lt;br /&gt;&lt;br /&gt;You can start by downloading source code from &lt;a href="http://flintparticles.org/source-code" target="_blank"&gt;project website&lt;/a&gt;. There are few options: source code for Flash or Flex, swc for Flash or Flex, documentation and excellent examples files.&lt;br /&gt;&lt;br /&gt;In order to include library code to your project you have two options. First one is to modify classpath of specific document you are working on or global classpath.&lt;br /&gt;&lt;br /&gt;I'm using second approach. Create working folder somewhere on your hard drive and name it MyFlintExamles. Unzip Flint_3_0_0_src.zip file you've already downloaded from project website and extract 'org' folder inside MyFlintExamles folder.&lt;br /&gt;&lt;br /&gt;I'll show you how to change existing example to suit your needs and just get started with Flint. Open Flint_3_0_0_examples.zip file and browse to examples2D\LogoTween\Flash where you will find two files you will need to extract in MyFlintExamples Frame1.as and LogoTween.fla.&lt;br /&gt;&lt;br /&gt;Now open LogoTween file and check Library (CTRL+L) and you will find two png files flint.png and particles.png. These two files you will have to create with your favorite graphics editing software. Make sure you save your files in png format 320x80.&lt;br /&gt;&lt;br /&gt;Here are my two files.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_uwXDfjmWSjM/TUx_g-xuwAI/AAAAAAAAAjs/EEXZ1FQp6ks/s1600/FlintExample.gif"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 183px;" src="http://4.bp.blogspot.com/_uwXDfjmWSjM/TUx_g-xuwAI/AAAAAAAAAjs/EEXZ1FQp6ks/s320/FlintExample.gif" alt="" id="BLOGGER_PHOTO_ID_5569967043734585346" border="0" /&gt;&lt;/a&gt;Inside LogoTween file, open Library and right-click on flint.png first and choose Properties to open Bitmap Properties. Click on Import... and select your first image. Leave everything else as it is.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_uwXDfjmWSjM/TUx_o3ghbWI/AAAAAAAAAj0/ECtxFRDAMuc/s1600/FlintExample2.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 106px;" src="http://3.bp.blogspot.com/_uwXDfjmWSjM/TUx_o3ghbWI/AAAAAAAAAj0/ECtxFRDAMuc/s320/FlintExample2.jpg" alt="" id="BLOGGER_PHOTO_ID_5569967179222314338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Do the same thing for other Library item particles.png and import your second (tween destination) file.&lt;br /&gt;&lt;br /&gt;You can modify number of particles used for tweening effect by opening Frame1.as and change number 5000 to something else on line 48:&lt;br /&gt;&lt;br /&gt;startEmitter.counter = new Blast( 5000 );&lt;br /&gt;&lt;br /&gt;Flash Player 10 is required to see this example.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" name="flashplayer" src="http://www.shareswf.com/media/games/swf/8878.swf" quality="high" swliveconnect="true" allowscriptaccess="samedomain" width="400" height="200"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://www.shareswf.com/game/8878/" target="new"&gt;View on ShareSWF&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-5679687201547537068?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/DfhmPQbGf_I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/5679687201547537068/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=5679687201547537068" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/5679687201547537068?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/5679687201547537068?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/DfhmPQbGf_I/getting-started-with-flint-as3-particle.html" title="Getting Started With Flint AS3 Particle System" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_uwXDfjmWSjM/TUx_g-xuwAI/AAAAAAAAAjs/EEXZ1FQp6ks/s72-c/FlintExample.gif" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/02/getting-started-with-flint-as3-particle.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAFR387fip7ImA9Wx9VEk8.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-5700686889201928063</id><published>2011-01-28T04:58:00.000-08:00</published><updated>2011-01-28T06:25:16.106-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-28T06:25:16.106-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="news" /><category scheme="http://www.blogger.com/atom/ns#" term="community" /><category scheme="http://www.blogger.com/atom/ns#" term="adobe" /><category scheme="http://www.blogger.com/atom/ns#" term="downloads" /><category scheme="http://www.blogger.com/atom/ns#" term="air" /><title>Facebook Desktop Application built with Adobe AIR</title><content type="html">When I read about Facebook Desktop my first thoughts were, this is like &lt;a href="http://flanture.blogspot.com/2008/08/air-based-twitter-application-tweetdeck.html" target="_blank"&gt;TweetDeck&lt;/a&gt;, but for Facebook! &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.facebookdesktop.com" target="_blank"&gt;Facebook Desktop&lt;/a&gt; application is developed by Charles Bihis and it is written in Adobe AIR, which means if you want to install it, you need to have AIR on your computer version 1.5 at least. However, installation process is painless and quick.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_uwXDfjmWSjM/TUK96aV-6QI/AAAAAAAAAjg/jJUfOssQLQc/s1600/FaceDeck.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 221px;" src="http://4.bp.blogspot.com/_uwXDfjmWSjM/TUK96aV-6QI/AAAAAAAAAjg/jJUfOssQLQc/s320/FaceDeck.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5567220900584941826" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Application current version is 0.83, so I guess you can't expect much from it. After you install the alication and allow it to connect with every aspect of your Facebook profile, you will get nice little blue square in your system tray. Great! Even beter, every once and a while, square will pop up notifications from your Facebook stream. This means no more boring logins via browser? Not quite. For now you will only be notified about new stories, but in order to read them you will still have to go there and do it 'manually'. &lt;br /&gt;&lt;br /&gt;If you have missed something while paying pizza delivery boy you have option to replay last five notifications in any time. No more excuses to do your job! However, you are not completely blind with Facebook Desktop, because you can update your status with it.&lt;br /&gt;&lt;br /&gt;It will be interesting to see future developments of this useful application and I hope many more improvements.&lt;br /&gt;&lt;br /&gt;p.s. while on FB check/like our page(just created)::&lt;a href="http://www.facebook.com/pages/Flanture/199549320059870" target="_blank"&gt;Flanture on Facebook&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-5700686889201928063?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/ZIQY4suiGnk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/5700686889201928063/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=5700686889201928063" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/5700686889201928063?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/5700686889201928063?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/ZIQY4suiGnk/facebook-desktop-application-built-with.html" title="Facebook Desktop Application built with Adobe AIR" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_uwXDfjmWSjM/TUK96aV-6QI/AAAAAAAAAjg/jJUfOssQLQc/s72-c/FaceDeck.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2011/01/facebook-desktop-application-built-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMEQHo-fip7ImA9Wx9RE0o.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-4498195974551251204</id><published>2010-12-14T17:16:00.000-08:00</published><updated>2010-12-14T17:26:41.456-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-14T17:26:41.456-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Snowfall Flash Animation Effect Example</title><content type="html">This simple example is based on two previous posts:&lt;br /&gt;&lt;br /&gt;1) &lt;a href="http://flanture.blogspot.com/2010/12/simple-flash-snowflake-generator.html" target="_blank"&gt;Simple Flash Snowflake Generator&lt;/a&gt; and&lt;br /&gt;2) &lt;a href="http://flanture.blogspot.com/2008/11/flash-tutorial-rain-effect.html" target="_blank"&gt;Flash Tutorial : Rain Effect&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Instead of using AS2 as in Rain Effect Tutorial, this is pure AS3 code.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" name="flashplayer" src="http://www.shareswf.com/media/games/swf/7545.swf" quality="high" swliveconnect="true" allowscriptaccess="samedomain" width="500" height="350"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://www.shareswf.com/game/7545/" target="new"&gt;hosted on ShareSWF&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can expect more complex examples later. Ask if you need further explanation.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-4498195974551251204?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/bkw3epkiyHw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/4498195974551251204/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=4498195974551251204" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/4498195974551251204?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/4498195974551251204?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/bkw3epkiyHw/snowfall-flash-animation-effect-example.html" title="Snowfall Flash Animation Effect Example" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2010/12/snowfall-flash-animation-effect-example.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QAR386eSp7ImA9Wx9REk8.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-6355972759482943280</id><published>2010-12-12T23:24:00.000-08:00</published><updated>2010-12-12T23:29:06.111-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-12T23:29:06.111-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="cs4" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="animations" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><category scheme="http://www.blogger.com/atom/ns#" term="cs5" /><category scheme="http://www.blogger.com/atom/ns#" term="math" /><title>Simple Flash Snowflake Generator</title><content type="html">Just like every year, few weeks before holidays there is plethora of animations which includes Santa, snow, various gift boxes, evergreen trees etc. Many of them are quite good as &lt;a href="http://activeden.net/collections/685487-christmas-flash-files/?ref=flanture" target="_blank"&gt;Christmas and New Year Flash cards&lt;/a&gt;, but almost all of them has one small shortage - snowflakes are made from same single MovieClip. Now if objects are small and distant that's fine, but to imitate depth some animations display bigger graphics and defect is visible.&lt;br /&gt;&lt;br /&gt;They say in real life there isn't two exact the same snowflakes, so I decided to solve this problem and create simple Snowflake Generator which will randomly create slightly different snowflake every time object is created. &lt;br /&gt;&lt;br /&gt;I don't have to generate entire snowflake at once, because snowflake is symmetric object in two ways.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_uwXDfjmWSjM/TQXKgCV-bZI/AAAAAAAAAjE/YDGtqicu5IE/s1600/flashsnowflake1.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 189px; height: 320px;" src="http://2.bp.blogspot.com/_uwXDfjmWSjM/TQXKgCV-bZI/AAAAAAAAAjE/YDGtqicu5IE/s320/flashsnowflake1.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5550064767537671570" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Take a look at a blue shape above. Points A, B and C are randomly generated, but they must be placed inside appropriate rectangles. After the shape is drawn, we copy the same shape and place it in mirrored position. Combined object is then copied 5 times and rotated for 60 degrees per object. In this way we will get 6 movie clips which forms single randomly created snowflake! Every time we call new snowflake() we get just a little bit of different shape. Nice.&lt;br /&gt;&lt;br /&gt;ActionScript 3.0 doesn't have duplicateMovieClip() method (this has been discussed widely on forums and some workarounds have been made) and in this case I will just create 6 different MovieClips and draw same graphic shape inside them. Six clips act as single snowflake which can be further animated to simulate &lt;a href="http://flanture.blogspot.com/2008/11/flash-tutorial-rain-effect.html" target="_blank"&gt;falling snow Flash animation&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;We create new MovieClip and inside we place next code:&lt;br /&gt;&lt;br /&gt;x = stage.stageWidth/2;&lt;br /&gt;y = stage.stageHeight/2;&lt;br /&gt;&lt;br /&gt;var field1:MovieClip = new MovieClip();&lt;br /&gt;var field2:MovieClip = new MovieClip();&lt;br /&gt;var field3:MovieClip = new MovieClip();&lt;br /&gt;var field4:MovieClip = new MovieClip();&lt;br /&gt;var field5:MovieClip = new MovieClip();&lt;br /&gt;var field6:MovieClip = new MovieClip();&lt;br /&gt;&lt;br /&gt;function drawFlake(mc:MovieClip):void&lt;br /&gt;{&lt;br /&gt; mc.graphics.beginFill(0xffffff);&lt;br /&gt; mc.graphics.lineTo(0, 80);&lt;br /&gt; mc.graphics.lineTo(aX, aY);&lt;br /&gt; mc.graphics.lineTo(bX, bY);&lt;br /&gt; mc.graphics.lineTo(cX, cY);&lt;br /&gt; mc.graphics.lineTo(0, 0);&lt;br /&gt; mc.graphics.lineTo(0, 80);&lt;br /&gt; mc.graphics.lineTo(-aX, aY);&lt;br /&gt; mc.graphics.lineTo(-bX, bY);&lt;br /&gt; mc.graphics.lineTo(-cX, cY);&lt;br /&gt; mc.graphics.lineTo(0, 0);&lt;br /&gt; mc.graphics.endFill(); &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;var aX = Math.random()*10+10; // (10-20)&lt;br /&gt;var aY = Math.random()*20+60; // (60-80)&lt;br /&gt;var bX = Math.random()*10; // (0-10)&lt;br /&gt;var bY = Math.random()*20+40; // (40-60)&lt;br /&gt;var cX = Math.random()*10+10; // (10-20)&lt;br /&gt;var cY = Math.random()*20+20; // (20-40)&lt;br /&gt;&lt;br /&gt;drawFlake(field1);&lt;br /&gt;addChild(field1);&lt;br /&gt;&lt;br /&gt;drawFlake(field2);&lt;br /&gt;field2.rotation = 60;&lt;br /&gt;addChild(field2);&lt;br /&gt;&lt;br /&gt;drawFlake(field3);&lt;br /&gt;field3.rotation = 120;&lt;br /&gt;addChild(field3);&lt;br /&gt;&lt;br /&gt;drawFlake(field4);&lt;br /&gt;field4.rotation = 180;&lt;br /&gt;addChild(field4);&lt;br /&gt;&lt;br /&gt;drawFlake(field5);&lt;br /&gt;field5.rotation = 240;&lt;br /&gt;addChild(field5);&lt;br /&gt;&lt;br /&gt;drawFlake(field6);&lt;br /&gt;field6.rotation = 300;&lt;br /&gt;addChild(field6);&lt;br /&gt;&lt;br /&gt;DrawFlake function actually draws two symmetric shapes based on three Points with randomly chosen position. On main timeline we only have to call our snowflake like it:&lt;br /&gt;&lt;br /&gt;var flake:snowflake = new snowflake();&lt;br /&gt;addChild(flake);&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_uwXDfjmWSjM/TQXKx3Y0ytI/AAAAAAAAAjM/TkorQcxLdnA/s1600/flashsnowflake2.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 267px;" src="http://3.bp.blogspot.com/_uwXDfjmWSjM/TQXKx3Y0ytI/AAAAAAAAAjM/TkorQcxLdnA/s400/flashsnowflake2.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5550065073834478290" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-6355972759482943280?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/LojoFFeLAbM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/6355972759482943280/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=6355972759482943280" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/6355972759482943280?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/6355972759482943280?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/LojoFFeLAbM/simple-flash-snowflake-generator.html" title="Simple Flash Snowflake Generator" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_uwXDfjmWSjM/TQXKgCV-bZI/AAAAAAAAAjE/YDGtqicu5IE/s72-c/flashsnowflake1.gif" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://flanture.blogspot.com/2010/12/simple-flash-snowflake-generator.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIEQ307fCp7ImA9Wx5bE0U.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-4347787419692585315</id><published>2010-10-29T13:17:00.000-07:00</published><updated>2010-10-29T13:35:02.304-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-29T13:35:02.304-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="flex" /><category scheme="http://www.blogger.com/atom/ns#" term="flex examples" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="books" /><category scheme="http://www.blogger.com/atom/ns#" term="free ebooks" /><category scheme="http://www.blogger.com/atom/ns#" term="game development" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="downloads" /><category scheme="http://www.blogger.com/atom/ns#" term="flash" /><title>Free Flash + AS3 + Flex Tutorials e-book</title><content type="html">&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.scribd.com/doc/40438706" target="_blank"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 125px; height: 177px;" src="http://1.bp.blogspot.com/_uwXDfjmWSjM/TMsvoyOgk_I/AAAAAAAAAi0/x2Xu3K5pGa4/s200/FlantureBookThumb.jpg" alt="" id="BLOGGER_PHOTO_ID_5533568944878687218" border="0" /&gt;&lt;/a&gt;About two months ago I published my first e-book on Lulu. At first, idea was to create collection of better tutorials from this blog, which I'm writing for the past 3 and a half years. Initially, there was a small price under 5 bucks, but two months later I sold only 1 copy, so I decided to give it away for free. Actually, I wasn't selling the book, it was more like a small-donation-model to keep my blog running.&lt;br /&gt;&lt;br /&gt;Right now, you can download the book from &lt;a href="http://www.lulu.com/product/ebook/flash-adventure-tutorials/12670110" target="_blank"&gt;LULU pages&lt;/a&gt; or from &lt;a href="http://www.scribd.com/doc/40438706" target="_blank"&gt;Scribd&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As previously planned I'll update my e-book every 3-4 months with new tutorials and maybe few not available on this blog :)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-4347787419692585315?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/RhrZWTsq1DE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/4347787419692585315/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=4347787419692585315" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/4347787419692585315?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/4347787419692585315?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/RhrZWTsq1DE/free-flash-as3-flex-tutorials-e-book.html" title="Free Flash + AS3 + Flex Tutorials e-book" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_uwXDfjmWSjM/TMsvoyOgk_I/AAAAAAAAAi0/x2Xu3K5pGa4/s72-c/FlantureBookThumb.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://flanture.blogspot.com/2010/10/free-flash-as3-flex-tutorials-e-book.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAHRXszfip7ImA9Wx5UFUw.&quot;"><id>tag:blogger.com,1999:blog-932984404072302429.post-3637536361609380686</id><published>2010-10-19T10:42:00.000-07:00</published><updated>2010-10-19T10:52:14.586-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-19T10:52:14.586-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="flex" /><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="flex examples" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="flex hero" /><category scheme="http://www.blogger.com/atom/ns#" term="math" /><category scheme="http://www.blogger.com/atom/ns#" term="components" /><category scheme="http://www.blogger.com/atom/ns#" term="open source" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="actionscript" /><category scheme="http://www.blogger.com/atom/ns#" term="AS3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="examples" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="spark" /><title>Custom Flex 4 HornLayout variation</title><content type="html">Few days ago I presented &lt;a href="http://flanture.blogspot.com/2010/10/custom-flex-4-spark-trianglelayout.html" target="_blank"&gt;custom Flex 4 TriangleLayout&lt;/a&gt;. Another variation of this layout would be when individual items are ordered from left to right, unlike in TrinagleLayout where items are placed top to bottom. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_uwXDfjmWSjM/TL3ZphgkAjI/AAAAAAAAAis/BrmaidEl9us/s1600/HornLayout.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 138px;" src="http://2.bp.blogspot.com/_uwXDfjmWSjM/TL3ZphgkAjI/AAAAAAAAAis/BrmaidEl9us/s400/HornLayout.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5529815224873648690" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Code is almost the same, just a minor differences.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;HornLayout.as&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 400px"&gt;&lt;code&gt;&lt;br /&gt;package com.flash2nd.layout {&lt;br /&gt;    &lt;br /&gt;    // author: http://flanture.blogspot.com - www.flash2nd.com&lt;br /&gt;    // license: http://creativecommons.org/licenses/by/3.0/&lt;br /&gt;    // October 2010&lt;br /&gt;    &lt;br /&gt;    import mx.core.ILayoutElement;&lt;br /&gt;    import mx.utils.ObjectUtil;&lt;br /&gt;    &lt;br /&gt;    import spark.layouts.supportClasses.LayoutBase;&lt;br /&gt;    &lt;br /&gt;    public class HornLayout extends LayoutBase {&lt;br /&gt;        &lt;br /&gt;        public function HornLayout() {&lt;br /&gt;            super();&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        override public function measure():void {&lt;br /&gt;            super.measure();&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        override public function updateDisplayList(width:Number, height:Number):void {&lt;br /&gt;            super.updateDisplayList(width,height);&lt;br /&gt;            &lt;br /&gt;            if(target){&lt;br /&gt;                var count:int = target.numElements;&lt;br /&gt;                var layoutElement:ILayoutElement;&lt;br /&gt;                var startX:Number = 0;&lt;br /&gt;                var startY:Number = target.height/2;&lt;br /&gt;                var shift:int = 1;&lt;br /&gt;                                &lt;br /&gt;                for(var i:int = 1; i &amp;lt; count+1; i++){&lt;br /&gt;                    // find current level&lt;br /&gt;                    var level:int = findLevel(i);&lt;br /&gt;                    &lt;br /&gt;                    layoutElement = target.getElementAt(i-1);&lt;br /&gt;                    layoutElement.setLayoutBoundsSize(NaN,NaN);&lt;br /&gt;                    &lt;br /&gt;                    var elWidth:Number = layoutElement.getLayoutBoundsWidth();&lt;br /&gt;                    var elHeight:Number = layoutElement.getLayoutBoundsHeight();&lt;br /&gt;&lt;br /&gt;                    if (level !== findLevel(i-1)) {&lt;br /&gt;                        shift = i;&lt;br /&gt;                    }&lt;br /&gt;                    &lt;br /&gt;                    var x:Number = startX + elWidth * (level - 1) * 2;&lt;br /&gt;                    var y:Number = startY - elHeight * (level - 1) + (i % shift) * elHeight * 2;&lt;br /&gt;                    &lt;br /&gt;                    layoutElement.setLayoutBoundsPosition(x,y);&lt;br /&gt;                }                &lt;br /&gt;            }&lt;br /&gt;            &lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        private function findLevel(index:int):int {&lt;br /&gt;            var levelCounter:int = 1;&lt;br /&gt;            var sum:int = 1;&lt;br /&gt;            while (sum &amp;lt; index) {&lt;br /&gt;                sum += levelCounter;&lt;br /&gt;                if (sum &amp;lt;= index) {&lt;br /&gt;                    levelCounter += 1;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            return levelCounter;&lt;br /&gt;        }        &lt;br /&gt;        &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;HornLayoutTest.mxml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 400px"&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;s:Application &lt;br /&gt;    xmlns:fx=&amp;quot;http://ns.adobe.com/mxml/2009&amp;quot; &lt;br /&gt;    xmlns:s=&amp;quot;library://ns.adobe.com/flex/spark&amp;quot; &lt;br /&gt;    xmlns:mx=&amp;quot;library://ns.adobe.com/flex/mx&amp;quot; &lt;br /&gt;    xmlns:layout=&amp;quot;com.flash2nd.layout.*&amp;quot;&lt;br /&gt;    width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;        &amp;lt;s:layout&amp;gt;&lt;br /&gt;            &amp;lt;layout:HornLayout/&amp;gt;&lt;br /&gt;        &amp;lt;/s:layout&amp;gt;&lt;br /&gt;        &lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button A&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button B&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button C&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button D&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button E&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button F&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button G&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button H&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button I&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button J&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button K&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button L&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button M&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button N&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button O&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button P&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button Q&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;s:Button label=&amp;quot;Button R&amp;quot;/&amp;gt;    &lt;br /&gt;    &lt;br /&gt;&amp;lt;/s:Application&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;sharing is caring :)&lt;br /&gt;thanx.&lt;br /&gt;&lt;br /&gt;*_*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/932984404072302429-3637536361609380686?l=flanture.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/flanture2/~4/4e-_X6FxgOE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://flanture.blogspot.com/feeds/3637536361609380686/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=932984404072302429&amp;postID=3637536361609380686" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/3637536361609380686?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/932984404072302429/posts/default/3637536361609380686?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/flanture2/~3/4e-_X6FxgOE/custom-flex-4-hornlayout-variation.html" title="Custom Flex 4 HornLayout variation" /><author><name>flanture</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_uwXDfjmWSjM/TL3ZphgkAjI/AAAAAAAAAis/BrmaidEl9us/s72-c/HornLayout.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://flanture.blogspot.com/2010/10/custom-flex-4-hornlayout-variation.html</feedburner:origLink></entry></feed>

