<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-24694385</id><updated>2010-02-07T00:30:07.984-08:00</updated><title type='text'>Robert Penner on Flash</title><subtitle type='html'>Thoughts on Flash and flashes of thought.</subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://robertpenner.com/flashblog/atom.xml'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-24694385.post-2412915458699689668</id><published>2009-09-13T22:51:00.000-07:00</published><updated>2009-09-23T18:12:08.043-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Signals'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3'/><category scheme='http://www.blogger.com/atom/ns#' term='events'/><title type='text'>AS3 Signals Getting Stronger</title><content type='html'>A lot has happened in the last four days.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;What Happen? We Git Signal&lt;/h3&gt;&lt;br /&gt;The majority of &lt;a href="https://www.blogger.com/comment.g?blogID=24694385&amp;amp;postID=3826655695904005112"&gt;commenters&lt;/a&gt; preferred Github to Google Code so I moved the Signals project there:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://github.com/robertpenner/as3-signals"&gt;http://github.com/robertpenner/as3-signals&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I am experimenting with mirroring back to the &lt;a href="http://code.google.com/p/as3-signals/source/list"&gt;Google Code SVN&lt;/a&gt;. It's going ok so far.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Committing Early and Often&lt;/h3&gt;&lt;br /&gt;I made about 20&amp;nbsp;&lt;a href="http://github.com/robertpenner/as3-signals/commits/"&gt;commits to Github&lt;/a&gt;&amp;nbsp;this weekend. Some highlights:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The &lt;b&gt;package&lt;/b&gt; &lt;b&gt;is now&lt;/b&gt; &lt;i&gt;&lt;b&gt;org.osflash.signals&lt;/b&gt;&lt;/i&gt; (previously &lt;i&gt;com.robertpenner&lt;/i&gt;). &lt;br /&gt;I wanted it to have more of a community feel. Thanks &lt;a href="http://aralbalkan.com/"&gt;Aral&lt;/a&gt; for the &lt;a href="http://osflash.org/"&gt;namespace&lt;/a&gt;!&lt;/li&gt;&lt;li&gt;Listener &lt;b&gt;priority&lt;/b&gt; is now supported in &lt;i&gt;ISignal.add()&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;&lt;i&gt;ISignal.dispatch()&lt;/i&gt; can now &lt;b&gt;send any number of arguments&lt;/b&gt; to listeners. &lt;br /&gt;Zero or ten, it's up to you.&lt;/li&gt;&lt;li&gt;Various classes and APIs were &lt;b&gt;renamed for clarity&lt;/b&gt;. &lt;/li&gt;&lt;li&gt;More &lt;b&gt;unit &lt;/b&gt;&lt;b&gt;tests &lt;/b&gt;and &lt;b&gt;fixes&lt;/b&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3&gt;Going Native&lt;/h3&gt;&lt;br /&gt;Since my last post about &lt;a href="http://robertpenner.com/flashblog/2009/09/community-responds-to-as3-signals.html"&gt;connecting EventDispatchers to Signals&lt;/a&gt;, I&amp;nbsp;had another idea for integration:&lt;br /&gt;&lt;br /&gt;Why not &lt;b&gt;use &lt;/b&gt;&lt;i&gt;&lt;b&gt;EventDispatcher &lt;/b&gt;&lt;/i&gt;&lt;b&gt;for the actual dispatching&lt;/b&gt; but wrap it in a &lt;i&gt;Signal &lt;/i&gt;facade?&lt;br /&gt;&lt;br /&gt;Presenting the&amp;nbsp;&lt;i&gt;&lt;a href="http://draft.blogger.com/goog_1252903185931"&gt;NativeSignal &lt;/a&gt;&lt;/i&gt;&lt;a href="http://github.com/robertpenner/as3-signals/blob/2f98c391bbf62d6b630182cb896b52babf68f002/src/org/osflash/signals/NativeSignal.as"&gt;class&lt;/a&gt;, which lets you have your cake and eat it too.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Take any &lt;i&gt;EventDispatcher&lt;/i&gt;, e.g. &lt;i&gt;Sprite&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Create a&amp;nbsp;&lt;i&gt;NativeSignal&amp;nbsp;&lt;/i&gt;that targets an event of the dispatcher: &lt;br /&gt;&lt;pre&gt;// in a subclass:&lt;br /&gt;click = new NativeSignal(this, 'click', MouseEvent);&lt;br /&gt;&lt;br /&gt;// or decorating an instance:&lt;br /&gt;click = new NativeSignal(theDispatcher, 'click', MouseEvent);&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Enjoy the &lt;a href="http://wiki.github.com/robertpenner/as3-signals/features"&gt;Signal APIs and features&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Dispatch from the&amp;nbsp;&lt;span style="font-style: italic;"&gt;NativeSignal &lt;/span&gt;or the &lt;i&gt;EventDispatcher&lt;/i&gt;. Both use Flash's native &lt;i&gt;dispatchEvent()&lt;/i&gt;.&amp;nbsp; &lt;/li&gt;&lt;/ol&gt;&lt;div&gt;If you're hesitant to put your trust in new dispatching code, or you want to keep your &lt;i&gt;EventDispatcher &lt;/i&gt;options open, this is the gateway drug for you. You don't have to give up anything. All the native functionality stays, and the &lt;i&gt;&lt;a href="http://github.com/robertpenner/as3-signals/tree/2f98c391bbf62d6b630182cb896b52babf68f002/src/org/osflash/signals"&gt;ISignal&lt;/a&gt;&lt;/i&gt; interface can be piped in like frosting, wherever you like. Doesn't that sound delicious?&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;Get Connected&lt;br /&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;I set up a &lt;a href="http://groups.google.com/group/as3-signals"&gt;Google Group for AS3 Signals&lt;/a&gt;&amp;nbsp;for discussion and updates via email.&lt;/li&gt;&lt;li&gt;Here's &lt;a href="http://twitter.com/robpenner"&gt;my Twitter&lt;/a&gt;.&amp;nbsp;I'm using the &lt;a href="http://search.twitter.com/search?q=%23as3signals"&gt;#as3signals hash tag&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-2412915458699689668?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/2412915458699689668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=2412915458699689668' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/2412915458699689668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/2412915458699689668'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2009/09/as3-signals-getting-stronger.html' title='AS3 Signals Getting Stronger'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-3826655695904005112</id><published>2009-09-09T22:49:00.000-07:00</published><updated>2009-09-23T18:12:52.191-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Signals'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3'/><category scheme='http://www.blogger.com/atom/ns#' term='events'/><title type='text'>The Community Responds to AS3 Signals</title><content type='html'>The community response to my &lt;b&gt;Signals&lt;/b&gt; event system has been very encouraging. In the two days since I opened it to the public, there have been dozens of&amp;nbsp;&lt;a href="http://robertpenner.com/flashblog/2009/09/my-new-as3-event-system-signals.html#comments"&gt;comments on my announcement&lt;/a&gt; and&amp;nbsp;&lt;a href="http://search.twitter.com/search?q=%23as3signals"&gt;re-tweets&lt;/a&gt;. People have been quite positive and interested. No one has told me I'm wasting my time (you could be the first!).&lt;br /&gt;&lt;br /&gt;The best part has been people's insights for improving &lt;b&gt;Signals&lt;/b&gt;. I'm been rapidly integrating them as you can see in &lt;a href="http://code.google.com/p/as3-signals/source/list"&gt;my commits&lt;/a&gt;&amp;nbsp;for the last two days. A special thanks goes out to &lt;a href="http://www.bigroom.co.uk/blog/"&gt;Richard Lord&lt;/a&gt; for helping me understand AS3 event bubbling and how to implement it in &lt;i&gt;Signal&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Connecting EventDispatchers to Signals&lt;/h3&gt;&lt;br /&gt;[EDIT: I renamed &lt;i&gt;EventDispatcherSignal &lt;/i&gt;to &lt;i&gt;NativeRelaySignal&lt;/i&gt;]&lt;br /&gt;&lt;br /&gt;I received a very clever idea by &lt;a href="http://jacwright.com/"&gt;Jacob Wright&lt;/a&gt; for relaying &lt;i&gt;&lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/EventDispatcher.html"&gt;EventDispatcher&lt;/a&gt; &lt;/i&gt;events&lt;i&gt;&amp;nbsp;&lt;/i&gt;to &lt;i&gt;Signal &lt;/i&gt;listeners. I implemented it in a new&amp;nbsp;&lt;i&gt;&lt;span style="text-decoration: line-through;"&gt;EventDispatcherSignal&lt;/span&gt;&amp;nbsp;&lt;a href="http://github.com/robertpenner/as3-signals/blob/2f98c391bbf62d6b630182cb896b52babf68f002/src/org/osflash/signals/NativeRelaySignal.as"&gt;NativeRelaySignal&lt;/a&gt;&lt;/i&gt; class. It lets you easily wire, say, a &lt;i&gt;Sprite&amp;nbsp;&lt;/i&gt;to send native events through your own signals. The same goes for any object that implements &lt;i&gt;&lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/IEventDispatcher.html"&gt;IEventDispatcher&lt;/a&gt;&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Here's how you could create a &lt;i&gt;Sprite &lt;/i&gt;subclass that uses a &lt;i&gt;Signal &lt;/i&gt;for the &lt;i&gt;click&lt;/i&gt; event:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public function MySprite()&lt;br /&gt;{&lt;br /&gt; click = new NativeRelaySignal(this, 'click', MouseEvent);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// listen elsewhere&lt;br /&gt;function onClick(e:MouseEvent):void { ... }&lt;br /&gt;&lt;br /&gt;mySpriteInstance.click.add(onClick);&lt;br /&gt;// fire a MouseEvent manually to test&lt;br /&gt;mySpriteInstance.dispatchEvent(new MouseEvent()); // onClick is fired&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The implementation of wiring the &lt;i&gt;Signal &lt;/i&gt;to the &lt;i&gt;IEventDispatcher &lt;/i&gt;is very simple:&lt;br /&gt;&lt;br /&gt;[EDIT] I added listener count checking to avoid bugs (thanks to &lt;a href="http://www.bigroom.co.uk/blog/"&gt;Richard Lord&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;// in NativeRelaySignal.as&lt;br /&gt;override public function add(listener:Function, priority:int = 0):void&lt;br /&gt;{&lt;br /&gt; var prevListenerCount:uint = listeners.length;&lt;br /&gt; // Try to add first because it may throw an exception.&lt;br /&gt; super.add(listener);&lt;br /&gt; // Account for cases where the same listener is added twice.&lt;br /&gt; if (prevListenerCount == 0 &amp;amp;&amp;amp; listeners.length == 1)&lt;br /&gt;  IEventDispatcher(target).addEventListener(_name, dispatch, false, priority);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Also, Jacob's twin &lt;a href="http://www.xtyler.com/"&gt;Tyler&lt;/a&gt; sent me some mind-bending ideas for radical memory efficiency.&amp;nbsp;He takes lazy instantiation to a whole new level.&amp;nbsp;I'm still reeling from thinking about things like &lt;i&gt;Signal&lt;/i&gt; inheriting from &lt;i&gt;Array &lt;/i&gt;and using a getter's &lt;i&gt;arguments.callee&lt;/i&gt;&amp;nbsp;as an index into a &lt;i&gt;Dictionary&lt;/i&gt;. We'll see how this evolves.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Github vs Google Code&lt;/h3&gt;&lt;br /&gt;&lt;b&gt;Question&lt;/b&gt;: Who would prefer using &lt;a href="http://github.com/"&gt;Github&lt;/a&gt; for the Signals project, rather than &lt;a href="http://code.google.com/"&gt;Google Code&lt;/a&gt;? I've used Git a bit and would be open to moving to it if contributors preferred that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-3826655695904005112?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/3826655695904005112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=3826655695904005112' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/3826655695904005112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/3826655695904005112'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2009/09/community-responds-to-as3-signals.html' title='The Community Responds to AS3 Signals'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-6676057862117031412</id><published>2009-09-07T19:17:00.000-07:00</published><updated>2009-10-07T19:10:51.081-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Signals'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3'/><category scheme='http://www.blogger.com/atom/ns#' term='events'/><title type='text'>My New AS3 Event System: Signals</title><content type='html'>I have more critiquing of AS3 events I could do, but I figured I'd throw my hat in the ring.&lt;br /&gt;&lt;br /&gt;I've been working on something I call &lt;b&gt;&lt;a href="http://github.com/robertpenner/as3-signals"&gt;Signals&lt;/a&gt;&lt;/b&gt;. It's a new approach for AS3 events, inspired by &lt;a href="http://en.wikipedia.org/wiki/C_Sharp_syntax#Events" rel="nofollow"&gt;C# events&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Signals_and_slots" rel="nofollow"&gt;signals/slots&lt;/a&gt; in Qt.&lt;br /&gt;&lt;br /&gt;Today I created my first-ever Google Code project:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/as3-signals/"&gt;&lt;span style="text-decoration: line-through;"&gt;http://code.google.com/p/as3-signals/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;EDIT: I moved the project to Github. &lt;a href="http://github.com/robertpenner/as3-signals"&gt;http://github.com/robertpenner/as3-signals&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I listed features with short code samples there. I'm having a hard time pasting them into Blogger without re-doing it all. Here are the Concept and Philosophy sections for a start:&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;The Concept&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;A &lt;b&gt;Signal&lt;/b&gt; is essentially a mini-dispatcher specific to one event, with its own array of listeners.&lt;/li&gt;&lt;li&gt;A Signal gives an event a concrete membership in a class.&lt;/li&gt;&lt;li&gt;Listeners subscribe to real objects, not to string-based channels.&lt;/li&gt;&lt;li&gt;Event string constants are no longer needed.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3&gt;Philosophy&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Composition and interfaces are favored over inheritance.&lt;/li&gt;&lt;li&gt;Events in interfaces are a good thing.&lt;/li&gt;&lt;li&gt;Event types are classes, not strings.&lt;/li&gt;&lt;li&gt;Event classes should focus on the data they contain, not on who sends them.&lt;/li&gt;&lt;li&gt;Event classes should not contain string constants that various other classes use.&lt;/li&gt;&lt;li&gt;Test-Driven Development (TDD) is essential and fun.&lt;/li&gt;&lt;li&gt;So far, not a single static keyword in the source.&lt;/li&gt;&lt;li&gt;No singletons.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The &lt;a href="http://github.com/robertpenner/as3-signals"&gt;Project Home Page&lt;/a&gt; has the feature listing and code examples.&lt;br /&gt;&lt;br /&gt;I want &lt;b&gt;Signals &lt;/b&gt;to be really good, and I'm open to changing anything and everything to improve it. So please check it out and post your impressions, critiques and suggestions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-6676057862117031412?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/6676057862117031412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=6676057862117031412' title='58 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/6676057862117031412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/6676057862117031412'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2009/09/my-new-as3-event-system-signals.html' title='My New AS3 Event System: Signals'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>58</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-9212834977491246672</id><published>2009-09-06T16:40:00.000-07:00</published><updated>2009-09-07T01:20:23.861-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AS3'/><category scheme='http://www.blogger.com/atom/ns#' term='events'/><title type='text'>My Critique of AS3 Events - Part 2 - The Dispatchening</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;a href="http://robertpenner.com/flashblog/2009/08/my-critique-of-as3-events-part-1.html"&gt;Part 1 of AS3 Events Critique&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/"&gt;What I learned about AS3 Events from the community&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Come with me as I chase more windmills.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;i&gt;flash.events.EventDispatcher &lt;/i&gt;could be easier to clean up&lt;br /&gt;&lt;/h3&gt;&lt;br /&gt;&lt;i&gt;removeAllEventListeners()&lt;/i&gt;, where are you? Everyone's been looking for you.&lt;br /&gt;And wouldn't it be great if I could mark some listeners to be removed automatically the first time called?&lt;br /&gt;&lt;br /&gt;Whatever, this is OOP, it shouldn't be too hard to subclass and do it myself.&lt;br /&gt;Let's create a new class, override &lt;i&gt;addEventListener()&lt;/i&gt; and...&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;flash.events.EventDispatcher &lt;/i&gt;is difficult to extend&lt;/h3&gt;&lt;br /&gt;Oh snap, looks like my subclass can't access all those listeners in &lt;i&gt;EventDispatcher&lt;/i&gt;.&lt;br /&gt;Guess I'll maintain my own array of listeners so I can remove them all easily. It's been done before:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://k2xl.com/wordpress/2008/07/02/as3-eventmanager-class-removealllisteners/"&gt;http://k2xl.com/wordpress/2008/07/02/as3-eventmanager-class-removealllisteners/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/k2xl/source/browse/trunk/as3classes/src/util/k2xl/EventManager.as"&gt;http://code.google.com/p/k2xl/source/browse/trunk/as3classes/src/util/k2xl/EventManager.as&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But now my array has strong references to all the listeners. The &lt;i&gt;useWeakReference&lt;/i&gt; option won't help me now.&lt;br /&gt;Ohhh, I know! &lt;i&gt;&lt;br /&gt;Dictionary &lt;/i&gt;can haz weak references? &lt;br /&gt;Theoretically, yes. &lt;br /&gt;Unfortunately, though, &lt;a href="http://www.gskinner.com/blog/archives/2006/07/as3_dictionary.html"&gt;storing methods in a weak keys &lt;i&gt;Dictionary&lt;/i&gt; is buggy&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Besides, &lt;i&gt;Dictionary&lt;/i&gt; has no concept of order.&lt;br /&gt;What if I need to know what sequence the listeners are in?&lt;br /&gt;Would I create a weak reference &lt;i&gt;Dictionary &lt;/i&gt;for each listener and have an array of dictionaries? &lt;br /&gt;&lt;a href="http://code.google.com/p/maashaack/source/browse/trunk/AS3/src/system/events/InternalBroadcaster.as"&gt;It's been done&lt;/a&gt;, but I'm not going to consider that until  the &lt;i&gt;Dictionary &lt;/i&gt;bug is fixed.&lt;br /&gt;Hmm... Can haz special array with weak references? Keep dreaming.&lt;br /&gt;&lt;br /&gt;The point being, &lt;i&gt;flash.events.EventDispatcher&lt;/i&gt; is a black box--the frustrating kind. &lt;b&gt;Adobe Flash Player engineers&lt;/b&gt;, if you're reading this and you know a magic namespace to open up the listeners, please let me know. While we're dreaming, how about a look at  the source code for &lt;i&gt;EventDispatcher&lt;/i&gt;?&lt;br /&gt;&lt;br /&gt;Oh well, at least we have the &lt;i&gt;IEventDispatcher &lt;/i&gt;interface. It seems like a lot of work, but I should be able to write my own dispatcher from scratch and satisfy the interface, right?&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;i&gt;IEventDispatcher &lt;/i&gt;cannot be implemented&lt;i&gt;&lt;/i&gt;&lt;/h3&gt;&lt;br /&gt;Not entirely true. It can, but not with pure AS3. But I don't know that yet.&lt;br /&gt;&lt;br /&gt;So I work away building my own implementation of &lt;i&gt;IEventDispatcher&lt;/i&gt;. I'm adding listeners, I'm removing listeners, I'm even removing &lt;i&gt;all &lt;/i&gt;listeners! Things are looking up.&lt;br /&gt;&lt;br /&gt;I'm at the exciting part now: the &lt;i&gt;dispatchEvent() &lt;/i&gt;method. Ok, find the listeners array for the event type, good, good. Now I'll just set the &lt;i&gt;event.target&lt;/i&gt; property to &lt;i&gt;this &lt;/i&gt;and iterate through the--&lt;br /&gt;&lt;br /&gt;GACK!&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;i&gt;Event.target&lt;/i&gt; is read-only&lt;/h3&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=WWaLxFIVX1s"&gt;NOOOoooooo!!!&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;I can picture the meeting in the secret DOM Level 3 Dungeon:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Level 3 Paladin&lt;/i&gt;:&amp;nbsp; "Would anyone ever need to change the event target?"&lt;br /&gt;&lt;i&gt;Level 3 Seer&lt;/i&gt;:&amp;nbsp; &lt;a href="http://www.youtube.com/watch?v=D58LpHBnvsI"&gt;"Inconceivable!"&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But, there must be &lt;i&gt;some &lt;/i&gt;way of changing the event target, right?&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;i&gt;IEventDispatcher &lt;/i&gt;cannot be implemented without using &lt;i&gt; EventDispatcher&lt;/i&gt;&lt;/h3&gt;&lt;br /&gt;You see, &lt;i&gt;flash.events.Event &lt;/i&gt;has a secret alliance with &lt;i&gt;flash.events.EventDispatcher&lt;/i&gt;.&lt;br /&gt;Only &lt;i&gt;EventDispatcher&lt;/i&gt; is entrusted with  the awesome power to change &lt;i&gt;target&lt;/i&gt;.&lt;br /&gt;We're so much safer that way.&lt;br /&gt;And yes, you will have to extend &lt;i&gt;flash.events.Event&lt;/i&gt; because there is no event interface&lt;i&gt;&lt;/i&gt;. &lt;br /&gt;&lt;br /&gt;Here's an offer you can't refuse: implement an interface using &lt;i&gt;one special implementation&lt;/i&gt; of that interface!&lt;br /&gt;&lt;br /&gt;You can write your own dispatcher if you like, but if you have a hang-up about  &lt;i&gt;target &lt;/i&gt;and &lt;i&gt;currentTarget &lt;/i&gt;being null all the time, you'll have to instantiate &lt;i&gt;EventDispatcher &lt;/i&gt;and have it dispatch the event for you. Which means it will need all your listeners and your Gmail password. Which makes you wonder why you even bothered.&lt;br /&gt;&lt;br /&gt;I hope this gives a sense of the obstacles that arise when trying to extend the AS3 event system. It fights you at every turn. Please let me know if I've overlooked or misunderstood anything.&lt;br /&gt;&lt;br /&gt;At least this article was fun to write. It solidifies my rationale for building and using my own event system when I don't need to integrate with the display list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-9212834977491246672?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/9212834977491246672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=9212834977491246672' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/9212834977491246672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/9212834977491246672'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2009/09/my-critique-of-as3-events-part-2.html' title='My Critique of AS3 Events - Part 2 - The Dispatchening'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-9182089614704553596</id><published>2009-09-06T13:02:00.000-07:00</published><updated>2009-09-06T17:14:29.715-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AS3'/><category scheme='http://www.blogger.com/atom/ns#' term='events'/><title type='text'>AS3 Events - 7 things I've learned from the community</title><content type='html'>Since posting &lt;a href="http://robertpenner.com/flashblog/2009/08/my-critique-of-as3-events-part-1.html"&gt;my initial critique of AS3 events&lt;/a&gt;, I've learned a fair bit through community feedback. Thanks everyone for &lt;a href="http://robertpenner.com/flashblog/2009/08/my-critique-of-as3-events-part-1.html#comments"&gt;your comments and corrections&lt;/a&gt;; I edited my original post accordingly. Conversations on &lt;a href="http://twitter.com/robpenner"&gt;Twitter&lt;/a&gt; brought out further subtleties of how developers work with AS3 events.&lt;br /&gt;&lt;br /&gt;I still have more critique in me, but first I'll eat a little &lt;a href="http://www.youtube.com/watch?v=rk5QXrSBcD4"&gt;humble pie&lt;/a&gt;. I haven't actually worked much with custom events in the display list. Most of my AS3 development has been in code libraries that operate independently of the display list. Thus, my custom events generally don't need to bubble or cancel. So when I look at the AS3 event system, I see APIs that often add clutter without a benefit to my project. For developers building RIAs, AS3 event capturing, targeting, bubbling and canceling is wonderful. The standard is called &lt;a href="http://www.w3.org/TR/DOM-Level-3-Events/"&gt;&lt;b&gt;DOM &lt;/b&gt;Level 3 Events &lt;/a&gt;for a reason. It's great if you're in a DOM, but that doesn't mean it's the most usable solution for  &lt;i&gt;events in general&lt;/i&gt;. But I'll have to leave that discussion for the next critique.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;What I've learned about AS3 events in the last 3 weeks&lt;/h3&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://stackoverflow.com/questions/749546/how-do-i-dispatch-a-custom-event-from-an-actionscript-3-class-and-listen-for-it-i"&gt;Custom events can bubble&lt;/a&gt; when you dispatch them from a &lt;i&gt;DisplayObject&lt;/i&gt;.&lt;br /&gt;I'd never tried this, and thought that only Flash Player events (&lt;i&gt;MouseEvent&lt;/i&gt;, etc.) could bubble.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.darronschall.com/weblog/2008/01/creating-default-cancelable-event-handlers.cfm"&gt;Custom events can be canceled&lt;/a&gt;.&lt;br /&gt;The &lt;i&gt;Event&lt;/i&gt; APIs &lt;i&gt;cancelable&lt;/i&gt;, &lt;i&gt;preventDefault()&lt;/i&gt; and &lt;i&gt;isDefaultPrevented()&lt;/i&gt; are not just for Flash Player events.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Despite &lt;a href="http://gskinner.com/blog/archives/2006/07/as3_weakly_refe.html"&gt;Grant Skinner's argument for using weak listeners&lt;/a&gt;, some experienced &lt;a href="http://joeberkovitz.com/blog/2007/06/20/moment-of-weakness-weak-event-listeners-can-be-dangerous/"&gt;developers&lt;/a&gt; &lt;a href="http://www.onflex.org/ted/2008/09/useweakreferencesboolean-false.php#comment-4397896382289296221"&gt;choose&lt;/a&gt; &lt;a href="http://gskinner.com/blog/archives/2006/07/as3_weakly_refe.html#comments"&gt;not to&lt;/a&gt;.&lt;br /&gt;Some say relying on weak references has caused more problems than anticipated. However, Grant advocated always removing listeners explicitly. Weak references are just "an added level of security". &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.onflex.org/ted/2008/09/useweakreferencesboolean-false.php#comment-6262590827069335129"&gt;Flash Player 9 didn't always garbage collect weak references&lt;/a&gt;. &lt;br /&gt;This is fixed in Player 10. &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.gskinner.com/blog/archives/2006/07/as3_dictionary.html"&gt;Storing method references in a weak keys &lt;i&gt;Dictionary&lt;/i&gt;is buggy&lt;/a&gt;. &lt;br /&gt;References may be duplicated or garbage collected prematurely. Technically, this isn't part of AS3 events. But when trying to extend the event system, you may use a &lt;i&gt;Dictionary &lt;/i&gt;to store listeners or callbacks. Developers who've done   this have learned not to use weak keys.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.gskinner.com/blog/archives/2008/12/making_dispatch.html"&gt;When an event has no listeners, &lt;i&gt;EventDispatcher.dispatchEvent()&lt;/i&gt; is unnecessarily slow&lt;/a&gt;.&lt;br /&gt;Grant Skinner's patch is a  5x speedup, apparently.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Some say &lt;a href="http://www.jodieorourke.com/view.php?id=110&amp;amp;blog=news"&gt;listener priorities are  smelly.&lt;br /&gt;&lt;/a&gt;Like &lt;i&gt;MovieClip.depth&lt;/i&gt; in AS2, priority numbers introduce dependencies into your code. These become increasingly difficult to manage in larger systems, as new code must take into account the&amp;nbsp; priorities in existing code. &lt;br /&gt;&lt;br /&gt;An alternative is to rely on the order the listeners are added. The original dispatcher can add itself as a listener first and thus ensure it has first crack at the event. Unless a different listener misbehaves and steals the spotlight with a higher priority... &lt;br /&gt;&lt;br /&gt;This is an interesting one. I haven't had to deal with this issue and I'm not sure what I think yet. The listener order does start to feel similar to the stacking of movie clips in AS2. Who's going to come out on top? Do we need an equivalent of &lt;i&gt;getNextHighestDepth()&lt;/i&gt; for listener priorities [shudder]? I'm reminded of how the Macromedia V2 components would grab the highest possible depth with its own depth manager, rendering &lt;i&gt;getNextHighestDepth()&lt;/i&gt; useless. Is there a word for bad nostalgia? How about "nastalgia"? &lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-9182089614704553596?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/9182089614704553596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=9182089614704553596' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/9182089614704553596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/9182089614704553596'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2009/09/as3-events-7-things-ive-learned-from.html' title='AS3 Events - 7 things I&apos;ve learned from the community'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-8367191751359601615</id><published>2009-08-16T22:58:00.000-07:00</published><updated>2010-01-22T20:45:20.173-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AS3'/><category scheme='http://www.blogger.com/atom/ns#' term='events'/><title type='text'>My Critique of AS3 Events - Part 1</title><content type='html'>I've been thinking about AS3 Events a lot lately. I'm finding them a little bit annoying.&lt;br /&gt;&lt;br /&gt;Don't get me wrong.  After so many changing event models in Flash 5 through 8 (4 if &lt;i&gt;tell target&lt;/i&gt; counts as an event), having one formalized in Flash Player 9 was a huge relief. I'm also aware that Macromedia didn't invent this event model. They used a standard: &lt;a href="http://www.w3.org/TR/DOM-Level-3-Events/"&gt;DOM Level 3 Events&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;But even standards have room for improvement, on occasion. What follows is a good-natured roasting.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Event constants are inconsistent&lt;/h3&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;Let's say I'm creating my first custom event, and I want to name it according to standard conventions.&lt;br /&gt;What better place to start than the &lt;a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/Event.html#constantSummary"&gt;constants in flash.events.Event&lt;/a&gt;, beginning with "A":&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;ACTIVATE &lt;/i&gt;&lt;/b&gt;(verb, present tense)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;ADDED &lt;/i&gt;&lt;/b&gt;(verb, past tense)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;That didn't take very long. Past or present? Pick a side; we're at war. War with time-traveling virtual machines.&lt;br /&gt;&lt;br /&gt;There must be a hidden logic to this. Perhaps I can decipher the pattern by looking at &lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/DisplayObject.html#eventSummary"&gt;&lt;i&gt;DisplayObject &lt;/i&gt;events&lt;/a&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;render&lt;/i&gt;&lt;/b&gt; &lt;i&gt;- Dispatched when the display list is &lt;b&gt;about to be updated and rendered&lt;/b&gt;.&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;Oh, I see! It's present-tense because the render hasn't happened yet.&lt;br /&gt;&lt;br /&gt;Wait, what's this?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;removed &lt;/i&gt;&lt;/b&gt;- &lt;i&gt;Dispatched when a display object is &lt;b&gt;about to be removed &lt;/b&gt;from the display list.&lt;/i&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;I give up. Time paradox = retcon fail.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;i&gt;addEventListener()&lt;/i&gt; ordered options awkwardly are&lt;/h3&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;Here is &lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/EventDispatcher.html#addEventListener%28%29"&gt;EventDispatcher.addEventListener()&lt;/a&gt; in all its glory:&lt;br /&gt;&lt;pre&gt;public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void&lt;/pre&gt;&lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/specialTypes.html#void"&gt;&lt;/a&gt;&lt;br /&gt;A general goal in designing a method is to arrange the parameters from the most important or frequently used to the least.&lt;br /&gt;&lt;br /&gt;Think fast!&lt;br /&gt;&lt;b&gt;Which optional parameter of &lt;i&gt;addEventListener()&lt;/i&gt; do you use the most&lt;/b&gt;?&lt;br /&gt;&lt;br /&gt;I'll bet you dollars to donuts you said &lt;i&gt;useWeakReference&lt;/i&gt;. &lt;strike&gt;If not, &lt;a href="http://gskinner.com/blog/archives/2006/07/as3_weakly_refe.html"&gt;you need to heed the G&lt;/a&gt;&lt;/strike&gt;. [EDIT: Many have told me it's better to use strong references and meticulously clean up after yourself. I don't use weak listeners anymore.] When you do, you'll get to type this, over and over:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;addEventListener(yada, yada, &lt;b&gt;&lt;i&gt;false, 0, true&lt;/i&gt;&lt;/b&gt;);&lt;br /&gt;addEventListener(yada, yada, &lt;b&gt;&lt;i&gt;false, 0, true&lt;/i&gt;&lt;/b&gt;);&lt;br /&gt;addEventListener(yada, yada, &lt;b&gt;&lt;i&gt;false, 0, true&lt;/i&gt;&lt;/b&gt;);&lt;/pre&gt;&lt;br /&gt;You'll say to yourself: "One of these days, I'm going to write &lt;i&gt;&lt;b&gt;true&lt;/b&gt;, 0, true&lt;/i&gt;. I just know it."&lt;br /&gt;&lt;br /&gt;Tech interview question!&lt;br /&gt;&lt;b&gt;How often do you &lt;i&gt;useCapture&lt;/i&gt; with your custom events? [EDIT: I was thinking of events not dispatched from a DisplayObject.]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[Dwight voice]&lt;br /&gt;Trick question. It is impossible. &lt;a href="http://livedocs.adobe.com/flex/3/html/help.html?content=events_08.html"&gt;FACT&lt;/a&gt;: Only DisplayObjects can have a capturing phase and a bubbling phase in addition to the targeting phase.&lt;br /&gt;&lt;br /&gt;But impossibility doesn't mean I have to forget about them! The &lt;i&gt;useCapture &lt;/i&gt;will be with you, always.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;i&gt;Event &lt;/i&gt;forces irrelevance on you&lt;/h3&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;Want to create your own event class? No problem! You can do whatever you like, as long as what you like is to extend &lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/Event.html"&gt;one special class&lt;/a&gt;. "&lt;a href="http://en.wikipedia.org/wiki/Barbie#Controversies"&gt;Interface is hard!&lt;/a&gt;" says Developer Barbie.&lt;br /&gt;&lt;br /&gt;Are you wondering how these exotic and intriguing  APIs can benefit your &lt;b&gt;custom event class&lt;/b&gt;?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;bubbles&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;currentTarget&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;eventPhase&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;stopImmediatePropagation()&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;stopPropagation()&lt;/i&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;[EDIT: Sönke and Matthew commented that the "default" APIs can be used in non-DisplayObjects.]&lt;br /&gt;&lt;br /&gt;Keep wondering! You don't get to use them. Players Club only.&lt;br /&gt;&lt;br /&gt;[EDIT: To clarify, I'm saying that these APIs are applicable only to events dispatched from DisplayObjects.]&lt;br /&gt;&lt;br /&gt;But look on the bright side. The code examples sucked anyway.&lt;br /&gt;&lt;br /&gt;[EDIT: Here's a good article by Darron Schall: &lt;a href="http://www.darronschall.com/weblog/2008/01/creating-default-cancelable-event-handlers.cfm"&gt;Creating Default, Cancelable Event Handlers&lt;/a&gt;.]&lt;br /&gt;&lt;br /&gt;Sorry, that's not exactly true. If you follow the &lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/Event.html#clone%28%29"&gt;official&lt;/a&gt; &lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/Event.html#formatToString%28%29"&gt; recommendations&lt;/a&gt;, you'll spend time using these APIs even though they're no use to you.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You'll put &lt;i&gt;bubbles &lt;/i&gt;and &lt;i&gt;cancelable &lt;/i&gt;in your constructor and pass them to &lt;i&gt;super()&lt;/i&gt;. &lt;/li&gt;&lt;li&gt;That means you'll get to put &lt;i&gt;bubbles &lt;/i&gt;and &lt;i&gt;cancelable &lt;/i&gt;in your &lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/Event.html#clone%28%29"&gt;&lt;i&gt;clone()&lt;/i&gt; override&lt;/a&gt; as well. &lt;/li&gt;&lt;li&gt;Top it off by &lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/Event.html#formatToString%28%29"&gt;overriding &lt;i&gt;toString()&lt;/i&gt;&lt;/a&gt;, bringing in &lt;i&gt;bubbles&lt;/i&gt;, &lt;i&gt;cancelable&lt;/i&gt;, and (oh, neat!) &lt;i&gt;eventPhase&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Now your event class looks busy. &lt;a href="http://businessguysonbusinesstrips.com/?p=105"&gt;Busy equals important&lt;/a&gt;, right?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;These are Adobe's documented recommendations. But all this typing has no benefit to you. None. If I missed something, please comment and enlighten me.&lt;br /&gt;[EDIT: Commenters have pointed out that &lt;i&gt;cancelable &lt;/i&gt;can be useful. But there's no need to  put it in the constructor if you're not going to use it.]&lt;br /&gt;&lt;br /&gt;I don't want this to sound like a big whinge. I mean, really, this stuff isn't &lt;i&gt;horrible&lt;/i&gt;. When it comes to events, AS3 is way better than Java events. But not as good as C#.&lt;br /&gt;To be continued.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://robertpenner.com/flashblog/2009/09/as3-events-7-things-ive-learned-from.html"&gt;What I learned about AS3 Events from the community&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://robertpenner.com/flashblog/2009/09/my-critique-of-as3-events-part-2.html"&gt;Part 2 of AS3 Events Critique&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-8367191751359601615?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/8367191751359601615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=8367191751359601615' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/8367191751359601615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/8367191751359601615'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2009/08/my-critique-of-as3-events-part-1.html' title='My Critique of AS3 Events - Part 1'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-9021578963871225387</id><published>2009-04-30T17:02:00.000-07:00</published><updated>2009-04-30T17:35:18.864-07:00</updated><title type='text'>Benefits of AsUnit XUL UI and solving Vista problem</title><content type='html'>AsUnit is my preferred unit testing framework for ActionScript 2 and 3. For years, I used just the AsUnit framework classes and wrote the unit tests myself. I didn't understand exactly what the "XUL UI" did or why I would use it.&lt;br /&gt;&lt;br /&gt;But when I finally gave it the old college try, I found that the AsUnit application was quite practical and sped up my workflow. The XUL UI automates some repetitive tasks of  &lt;a href="http://en.wikipedia.org/wiki/Test_driven_development"&gt;Test-Driven Development&lt;/a&gt; (TDD):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Creating a new class: &lt;b&gt;com.example.Widget&lt;/b&gt;&lt;/li&gt;&lt;li&gt; Creating package folders as necessary: &lt;b&gt;com &lt;/b&gt;and &lt;b&gt;example&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Creating the unit test class: &lt;b&gt;com.example.WidgetTest&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Creating &lt;b&gt;AllTests&lt;/b&gt; suite classes in every package folder that contains unit tests&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Practically, this means that when I need a new class, I fire up the AsUnit app, type in &lt;b style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;com.example.Widget&lt;/b&gt;, and in seconds I have code skeletons ready to go. It's so much easier to be disciplined about &lt;b&gt;writing tests first&lt;/b&gt; when they exist right off the bat.&lt;br /&gt;&lt;br /&gt;For more instructions, see this excellent &lt;a href="http://www.timbeynart.com/uploads/ASUnit_PartOne_revised.pdf"&gt;AsUnit tutorial by Tim Beynart&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;AsUnit for Windows&lt;/h3&gt;&lt;br /&gt;If this is at all convincing, you can download the &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=108947&amp;amp;package_id=168969"&gt;AsUnit XUL UI Windows installer here&lt;/a&gt;. (This link is gone from &lt;a href="http://asunit.org/"&gt;asunit.org&lt;/a&gt; at the moment, while &lt;a href="http://www.lukebayes.com/"&gt;Luke Bayes&lt;/a&gt; is reorganizing the site.)&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;AsUnit for OS X&lt;/h3&gt;&lt;br /&gt;If you're on the Mac, you can download an &lt;a href="http://aralbalkan.com/798"&gt;AsUnit OS X installer&lt;/a&gt; provided by Aral Balkan. The build is a little out-of-date, missing a few minor features added since then. However, Aral graciously wrote out his steps for creating the app at the end of &lt;a href="http://aralbalkan.com/798"&gt;his post&lt;/a&gt;. Luke is into &lt;a href="http://en.wikipedia.org/wiki/Git_%28software%29"&gt;Git&lt;/a&gt; now, so the &lt;a href="http://github.com/lukebayes/asunit-legacy/"&gt;source for XUL UI is in github&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;AsUnit for Vista: Problem and Solution&lt;/h3&gt;&lt;br /&gt;When I tried to install the AsUnit XUL UI on a Vista machine, the app refused to launch. It seemed as though Vista's increased security was causing problems with XULRunner. The best solution I found was by &lt;a href="http://www.flashdevelop.org/community/viewtopic.php?f=9&amp;amp;t=2994&amp;amp;p=13267"&gt;rhoq on the FlashDevelop boards&lt;/a&gt;. You simply create a shortcut to the .exe with the following in the &lt;b&gt;target&lt;/b&gt; field: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;"C:\Program Files\AsUnit\xulrunner\xulrunner.exe" -app ../xului/application.ini&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;My shortcut has this in the &lt;b&gt;Start in&lt;/b&gt; field, which seems to be necessary:&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;"C:\Program Files\AsUnit\xului\"&lt;/div&gt;&lt;br /&gt;Obviously, adjust these to your particular install path.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;A Parting Thought&lt;/h3&gt;&lt;br /&gt;I do Test-Driven Development for many reasons, but mainly because it's &lt;b&gt;fun&lt;/b&gt;. Writing tests &lt;i&gt;first &lt;/i&gt;is 100 times more enjoyable than writing tests &lt;i&gt;after &lt;/i&gt;production code. I'm not even joking when I say "it feels like rock climbing." I'll try to explain this in a later post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-9021578963871225387?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/9021578963871225387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=9021578963871225387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/9021578963871225387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/9021578963871225387'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2009/04/benefits-of-asunit-xul-ui-and-solving.html' title='Benefits of AsUnit XUL UI and solving Vista problem'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-8695825774343944065</id><published>2009-04-26T09:05:00.000-07:00</published><updated>2009-04-26T14:27:18.238-07:00</updated><title type='text'>Live Twitter from FITC Toronto</title><content type='html'>I'm attending the always excellent FITC conference in Toronto. Main sessions started today and I will be posting on Twitter live, provided the wifi stays up (a bit spotty so far). I'll be using the &lt;a href="http://search.twitter.com/search?q=%23fitc"&gt;#fitc search tag&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://twitter.com/robpenner"&gt;http://twitter.com/robpenner&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So far I've attended Alec Cove's &lt;a href="http://www.cove.org/ba_presentation/"&gt;Beautiful Algorithms&lt;/a&gt; nature-inspired session, and am in the middle of Mario Klingemann's &lt;b&gt;Tinkerer's Box&lt;/b&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-8695825774343944065?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/8695825774343944065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=8695825774343944065' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/8695825774343944065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/8695825774343944065'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2009/04/live-twitter-from-fitc-toronto.html' title='Live Twitter from FITC Toronto'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-1501701549840712101</id><published>2008-11-10T12:39:00.000-08:00</published><updated>2008-11-11T00:19:06.854-08:00</updated><title type='text'>Misconceptions about how Flash CS4 implements 3D</title><content type='html'>&lt;a href="http://www.bit-101.com/blog/?p=1682#comment-260736"&gt;Emanuele commented&lt;/a&gt; on Keith Peter's blog:&lt;br /&gt;&lt;blockquote&gt;"The reality is that there very little 3D code inside the player, at least native code. Whenever you export a movie that uses the new “3D” features, you’ll notice that about 13KB of AS3 code is attached to it. This code is responsible for the pseudo 3D rendering using same old tricks used by earlier 3D renderers. You see degradation in rendering because those vector objects are transformed into cached bitmaps and handled as texture over triangles. Bitmap resampling algorithms inside the player are pretty good, but not good enough in several situations like this one. The Flash IDE, however, does a good job by making completely transparent to the user that this 3D manipulation is not native to the player itself but rather to silently attached code."&lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://robertpenner.com/flashblog/images/orly_fishhead.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://robertpenner.com/flashblog/images/orly_fishhead.jpg" width="172" border="0" height="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;(here comes the snark)&lt;br /&gt;How then am I able to paste one line of code into FlashDevelop and get a perspective-correct 3D rotation?&lt;br /&gt;&lt;code&gt;&lt;br /&gt;myMovieClip['rotationX'] = 60;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;And my SWF isn't 13 KB, it's 1 KB. So apparently Flash Player 10 doesn't need any "pseudo 3D tricks". Sorry to be Mr. Snarky McSnarksalot, but saying "3D manipulation is not native to the player itself" is just asking for it.&lt;br /&gt;&lt;br /&gt;So what is that extra code injected by Flash CS4 actually doing? If you have &lt;a href="http://www.buraks.com/asv/"&gt;ASV&lt;/a&gt;, you don't have to guess; you can just decompile the SWF and take a look. You won't find any secret calls to &lt;i&gt;drawTriangles()&lt;/i&gt;, or even the word "triangle" anywhere (&lt;a href="http://www.bit-101.com/blog/?p=1686"&gt;sorry Keith&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;What you will find are &lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/motion/package-detail.html"&gt;&lt;i&gt;fl.motion&lt;/i&gt;&lt;/a&gt; classes. Remember those from Flash CS3? I wrote those to implement the &lt;i&gt;Copy Motion as AS3&lt;/i&gt; feature. For CS4, Rebecca Sun updated them to support 3D properties like &lt;i&gt;rotationX&lt;/i&gt;, etc. What happens is that when a CS4 motion tween uses 3D, all of the tween properties are controlled with the &lt;i&gt;&lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/motion/Animator3D.html"&gt;Animator3D&lt;/a&gt;&lt;/i&gt; class. This includes the simple ones like &lt;i&gt;x&lt;/i&gt; and &lt;i&gt;y&lt;/i&gt;. However, if you don't use 3D, the tween is implemented with SWF tags as it has been for a decade.&lt;br /&gt;&lt;br /&gt;Why the dramatic change in tween implementation when you use 3D? It boils down to Adobe deciding not to define new SWF tags for 3D features. I'm not going to comment here on the pros and cons of that decision. The practical result, though, is that 3D motion must be scripted, whether by you or by IDE-generated code. And apparently it's still the case that a movie clip is controlled &lt;i&gt;either &lt;/i&gt;by the timeline (i.e. with SWF tags) &lt;i&gt;or &lt;/i&gt;by ActionScript. I remember being surprised by this in Flash 4, when one &lt;i&gt;tellTarget &lt;/i&gt;to &lt;i&gt;_xscale&lt;/i&gt; would break a timeline tween permanently.&lt;br /&gt;&lt;br /&gt;The Animator3D class may look complex, but it's not doing any rendering &lt;i&gt;per se&lt;/i&gt;; it's doing motion. The rendering code is merely a few assignments to:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;this._target.transform.matrix3D&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There are a lot of &lt;i&gt;&lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/geom/Matrix3D.html"&gt;Matrix3D&lt;/a&gt; &lt;/i&gt;manipulations going on. But they are mainly to convert friendly properties like &lt;i&gt;rotationX&lt;/i&gt; to coefficients, and to interpolate between matrices. The &lt;i&gt;Animator &lt;/i&gt;and &lt;i&gt;Animator3D &lt;/i&gt;classes also have to make all scaling and rotation relative to the transformation point, not the origin. This is trickier than you might think.&lt;br /&gt;&lt;br /&gt;I hope this helps explain what's going on with that extra 3D code. The moral of this story could also be a nice tagline for &lt;a href="http://www.buraks.com/asv/"&gt;ActionScript Viewer&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;ASV: Don't guess what's in your SWF. Know it. &lt;/b&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-1501701549840712101?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/1501701549840712101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=1501701549840712101' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/1501701549840712101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/1501701549840712101'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2008/11/misconceptions-about-how-flash-cs4.html' title='Misconceptions about how Flash CS4 implements 3D'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-3347930447125929526</id><published>2008-08-26T07:53:00.000-07:00</published><updated>2008-08-26T23:39:52.549-07:00</updated><title type='text'>New build of FlashDevelop 3 released: Beta 8</title><content type='html'>&lt;a href="http://www.flashdevelop.org/community/viewtopic.php?f=11&amp;amp;t=3470&amp;amp;sid=76ce251c7030586f11efe40b2a31c9f7"&gt;Mika says&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;This release is long overdue but there were a few issues that we wanted to resolve and then there were summer vacations... &lt;img alt=":)" src="http://www.flashdevelop.org/community/images/smilies/icon_smile.gif" title="Smile" /&gt;&lt;br /&gt;There are quite a lot of new features and really nice stability improvements, we hope that all of you enjoy this release!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;About FlashDevelop:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* &lt;a class="postlink" href="http://www.flashdevelop.org/community/viewtopic.php?t=23"&gt;Features&lt;/a&gt;&lt;br /&gt;* &lt;a class="postlink" href="http://www.flashdevelop.org/wikidocs/index.php?title=Features:Generation"&gt;Screenshots&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Changes:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;GUI:&lt;br /&gt;* New "fullscreen" editor mode&lt;br /&gt;* New common GUI for AS2Api and ASDoc&lt;br /&gt;* SWF exploration shows the frame where definitions are imported&lt;br /&gt;&lt;br /&gt;ActionScript:&lt;br /&gt;* Fine tuned code completion&lt;br /&gt;* Dynamic syntax highlighting: custom classes get colored like flash classes (MovieClip, Event, etc)&lt;br /&gt;* Completion for package-level declarations and Flash 10's Vector.&lt;t&gt; type&lt;br /&gt;* New generator: Ctrl+Shift+1 on a non-imported type to generate the import&lt;br /&gt;* Go To Declaration (F4) with SWC classes display a generated pseudo-class&lt;br /&gt;* Improved generators&lt;br /&gt;&lt;br /&gt;&lt;/t&gt;MXML:&lt;br /&gt;* Tags with ID now appear in outline view and script code completion&lt;br /&gt;* Updated completion (generated using a tool available in SVN)&lt;br /&gt;&lt;br /&gt;Templates:&lt;br /&gt;* Improved MXML projects templates&lt;br /&gt;* New optimized AS3 project template with preloader (no Flex dependencies)&lt;br /&gt;* Templates now include an index.html with swfobject.js&lt;br /&gt;&lt;br /&gt;PHP:&lt;br /&gt;* Now featuring simple PHP completion&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Important:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight: bold;"&gt;Backup your customized user files&lt;/span&gt;: The setting files have changed quite a lot so check before you overwrite the new ones.&lt;br /&gt;* &lt;a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3" class="postlink"&gt;Get Adobe Flex 3 SDK.&lt;/a&gt; The free Flex SDK (2 or 3) is required for ActionScript 3 development if you don't use Flash CS3.&lt;br /&gt;* &lt;a href="http://www.adobe.com/support/flashplayer/downloads.html" class="postlink"&gt;Get the debug Flash player&lt;/a&gt; (you need: projector and Active X)&lt;br /&gt;* Java 1.6+ is required for the Flex compiler (ActionScript 3).&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.flashdevelop.org/community/images/smilies/icon_exclaim.gif" alt=":!:" title="Exclamation" /&gt; &lt;a href="http://www.flashdevelop.org/community/viewtopic.php?t=42" class="postlink"&gt;If you think the program is good, please donate some money for this project.&lt;/a&gt; &lt;img src="http://www.flashdevelop.org/community/images/smilies/icon_exclaim.gif" alt=":!:" title="Exclamation" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Download:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Built from rev. 36&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;a href="http://www.flashdevelop.org/downloads/releases/FlashDevelop-3.0.0-Beta8.exe" class="postlink"&gt;Download FlashDevelop 3.0.0 Beta8&lt;/a&gt;&lt;/span&gt;&lt;script&gt; code completion&lt;br /&gt;* Updated completion (generated using a tool available in SVN)&lt;br /&gt;&lt;br /&gt;Templates:&lt;br /&gt;* Improved MXML projects templates&lt;br /&gt;* New optimized AS3 project template with preloader (no Flex dependencies)&lt;br /&gt;* Templates now include an index.html with swfobject.js&lt;br /&gt;&lt;br /&gt;PHP:&lt;br /&gt;* Now featuring simple PHP completion&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Important:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight: bold;"&gt;Backup your customized user files&lt;/span&gt;: The setting files have changed quite a lot so check before you overwrite the new ones.&lt;br /&gt;* &lt;a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3" class="postlink"&gt;Get Adobe Flex 3 SDK.&lt;/a&gt; The free Flex SDK (2 or 3) is required for ActionScript 3 development if you don't use Flash CS3.&lt;br /&gt;* &lt;a href="http://www.adobe.com/support/flashplayer/downloads.html" class="postlink"&gt;Get the debug Flash player&lt;/a&gt; (you need: projector and Active X)&lt;br /&gt;* Java 1.6+ is required for the Flex compiler (ActionScript 3).&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.flashdevelop.org/community/images/smilies/icon_exclaim.gif" alt=":!:" title="Exclamation" /&gt; &lt;a href="http://www.flashdevelop.org/community/viewtopic.php?t=42" class="postlink"&gt;If you think the program is good, please donate some money for this project.&lt;/a&gt; &lt;img src="http://www.flashdevelop.org/community/images/smilies/icon_exclaim.gif" alt=":!:" title="Exclamation" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Download:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Built from rev. 36&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;a href="http://www.flashdevelop.org/downloads/releases/FlashDevelop-3.0.0-Beta8.exe" class="postlink"&gt;Download FlashDevelop 3.0.0 Beta8&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-3347930447125929526?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/3347930447125929526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=3347930447125929526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/3347930447125929526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/3347930447125929526'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2008/08/new-build-of-flashdevelop-3-released.html' title='New build of FlashDevelop 3 released: Beta 8'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-3650424218652305457</id><published>2008-08-26T06:26:00.000-07:00</published><updated>2008-08-26T16:57:03.333-07:00</updated><title type='text'>A job change for me: joining Club Penguin</title><content type='html'>After being with the Flash Authoring team for over two years, I've made a change. Adobe is an awesome company to work for, but I was working remotely and found I really needed more face-to-face interaction. Every time I went to San Francisco and worked at Flash HQ I'd have such a great time. Then after a week I'd come back and work in a room by myself for months on end. It got depressing after a while and I eventually realized that socializing at work wasn't just a privilege but a necessity for me. I wasn't ready to relocate so I found a position with &lt;a href="http://clubpenguin.com/"&gt;Club Penguin&lt;/a&gt;, a local (Kelowna, B.C.) company that Disney bought last year. I started last week and already I'm talking to myself less. =)&lt;br /&gt;&lt;br /&gt;Club Penguin has another position open right now:&lt;br /&gt;&lt;a href="http://www.clubpenguin.com/company/jobs/actionscript_programmer.htm" target="_blank"&gt;http://www.clubpenguin.com/&lt;wbr&gt;&lt;/wbr&gt;company/jobs/actionscript_&lt;wbr&gt;&lt;/wbr&gt;programmer.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I don't know what Adobe's plans are for my former position, but you can keep an eye on their job postings here:&lt;br /&gt;&lt;a href="http://cooljobs.adobe.com/frameset.html?goto=er-joblist"&gt;http://cooljobs.adobe.com/frameset.html?goto=er-joblist&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;At Club Penguin I'll be taking on massively multiplayer online game development, an exciting new challenge. I'll also be responsible for mentoring the ActionScripters here, equipping them with the best knowledge, tools and practices for Flash development.  I'll be advocating for some of my hobby horses like OOP, &lt;a href="http://en.wikipedia.org/wiki/Test-driven_development"&gt;TDD&lt;/a&gt; and &lt;a href="http://asunit.org/"&gt;AsUnit&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Pair_programming"&gt;pair programming&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Code_refactoring"&gt;refactoring&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Agile_software_development"&gt;Agile practices&lt;/a&gt;, &lt;a href="http://mtasc.org/"&gt;mtasc&lt;/a&gt; and &lt;a href="http://www.senocular.com/flash/tutorials/as3withmxmlc/"&gt;mxmlc&lt;/a&gt;, &lt;a href="http://subversion.tigris.org/"&gt;SVN&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Continuous_integration"&gt;continuous integration&lt;/a&gt;, &lt;a href="http://flashdevelop.org/"&gt;FlashDevelop&lt;/a&gt; and &lt;a href="http://www.adobe.com/products/flex/features/flex_builder/"&gt;Flex Builder&lt;/a&gt;. I love both teaching and creating so this will be a nice blend of the two.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-3650424218652305457?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/3650424218652305457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=3650424218652305457' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/3650424218652305457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/3650424218652305457'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2008/08/job-change-for-me-joining-club-penguin.html' title='A job change for me: joining Club Penguin'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-2641335633881557770</id><published>2007-09-28T17:38:00.000-07:00</published><updated>2007-09-28T18:20:08.372-07:00</updated><title type='text'>Creating AS3 Components in Flash: The Lost Chronicles - A Kamerer Adventure</title><content type='html'>"[Flash CS3 has a] lack of documentation on how to develop custom components ... Hopefully our screams for help will be heard."&lt;br /&gt;-- &lt;a href="http://flexion.wordpress.com/2007/07/25/reflections-on-fla-based-components/"&gt;Posted by SmackMe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Scream no more, Sir SmackMe. You just been smuck'd with an &lt;a href="http://www.adobe.com/devnet/flash/articles/creating_as3_components.html"&gt;epic mini-series on component creation&lt;/a&gt;, now up on Adobe's Developer Center. My colleague Jeff Kamerer, engineer on the Flash Authoring team, has written basically a thesis, a small book on how to make your own AS3 components with the Flash CS3 framework. When Jeff sent me a draft six weeks ago, it was 32,000 words and 102 pages. He's not kidding around.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;Here's the summary of what's covered:&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;&lt;b&gt;Creating ActionScript 3.0 components in Flash&lt;/b&gt;&lt;/p&gt;   After following along with this       series, you will learn how to do the following:     &lt;ul&gt;&lt;li&gt;Set up the layers and               frames in your component movie clip symbol&lt;/li&gt;&lt;li&gt;Implement Live Preview for         your component&lt;/li&gt;&lt;li&gt;Dispatch events&lt;/li&gt;&lt;li&gt;Support styles and easily         editable skins&lt;/li&gt;&lt;li&gt;Manage drawing with the         invalidation model&lt;/li&gt;&lt;li&gt;Manage focus&lt;/li&gt;&lt;li&gt;Handle keyboard input&lt;/li&gt;&lt;li&gt;Create a compiled clip         shim for your ActionScript definitions&lt;/li&gt;&lt;li&gt;Deploy your component to         the Components panel&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;a href="http://www.adobe.com/devnet/flash/articles/creating_as3_components.html"&gt;http://www.adobe.com/devnet/flash/articles/creating_as3_components.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-2641335633881557770?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/2641335633881557770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=2641335633881557770' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/2641335633881557770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/2641335633881557770'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2007/09/creating-as3-components-in-flash-lost.html' title='Creating AS3 Components in Flash: The Lost Chronicles - A Kamerer Adventure'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-2391389684296164844</id><published>2007-08-10T14:15:00.001-07:00</published><updated>2007-08-10T15:44:59.750-07:00</updated><title type='text'>JSFL updated to JavaScript 1.6, gains E4X</title><content type='html'>For Flash CS3, we updated our JSFL engine to version 1.6 of &lt;a href="http://en.wikipedia.org/wiki/Spidermonkey"&gt;SpiderMonkey&lt;/a&gt;. Firefox started using this version in Firefox 1.5. This is just the JavaScript interpreter, not the Document Object Model, which differs greatly between Firefox and Flash. (For those not familiar with &lt;a href="http://livedocs.adobe.com/flash/9.0/main/Part7_Extending_Flash_1.html#wp73346"&gt;JSFL&lt;/a&gt;, it's the JavaScript engine inside the Flash authoring tool; it's not in the Flash Player.)&lt;br /&gt;&lt;br /&gt;SpiderMonkey 1.6 introduced JavaScript 1.6, which is JavaScript 1.5 plus &lt;a href="http://developer.mozilla.org/en/docs/New_in_JavaScript_1.6"&gt;several new features&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;h3&gt;E4X&lt;br /&gt;&lt;/h3&gt;&lt;p&gt;ECMAScript for XML (E4X) is a programming language extension that adds native &lt;a href="http://developer.mozilla.org/en/docs/XML" title="XML"&gt;XML&lt;/a&gt; support to &lt;a href="http://developer.mozilla.org/en/docs/JavaScript" title="JavaScript"&gt;JavaScript&lt;/a&gt;. It does this by providing access to the XML document in a form that feels natural for ECMAScript programmers. The goal is to provide an alternative, simpler syntax for accessing XML documents than via &lt;a href="http://developer.mozilla.org/en/docs/DOM" title="DOM"&gt;DOM&lt;/a&gt; interfaces. &lt;/p&gt;&lt;p&gt;E4X is standardized by Ecma International in &lt;a href="http://www.ecma-international.org/publications/standards/Ecma-357.htm" class="external text" title="http://www.ecma-international.org/publications/standards/Ecma-357.htm" rel="nofollow"&gt;ECMA-357 standard&lt;/a&gt; (currently in its second edition, December 2005). &lt;/p&gt;&lt;p&gt;E4X is implemented (at least partially) in &lt;a href="http://developer.mozilla.org/en/docs/SpiderMonkey" title="SpiderMonkey"&gt;SpiderMonkey&lt;/a&gt; (&lt;a href="http://developer.mozilla.org/en/docs/Gecko" title="Gecko"&gt;Gecko&lt;/a&gt;'s JavaScript engine) and in &lt;a href="http://developer.mozilla.org/en/docs/Rhino" title="Rhino"&gt;Rhino&lt;/a&gt; (JavaScript engine written in Java). &lt;/p&gt;&lt;h3&gt;Array Extras&lt;br /&gt;&lt;/h3&gt;&lt;p&gt;There are seven new &lt;code&gt;&lt;a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array" title="Core JavaScript 1.5 Reference:Objects:Array"&gt;Array&lt;/a&gt;&lt;/code&gt; methods that can be separated into two categories, item location methods and iterative methods. The item location methods are: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;code&gt;&lt;a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:indexOf" title="Core JavaScript 1.5 Reference:Objects:Array:indexOf"&gt;indexOf()&lt;/a&gt;&lt;/code&gt; - returns the index of the given item's first occurrence. &lt;/li&gt;&lt;li&gt; &lt;code&gt;&lt;a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:lastIndexOf" title="Core JavaScript 1.5 Reference:Objects:Array:lastIndexOf"&gt;lastIndexOf()&lt;/a&gt;&lt;/code&gt; - returns the index of the given item's last occurrence. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The iterative methods are: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;code&gt;&lt;a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:every" title="Core JavaScript 1.5 Reference:Objects:Array:every"&gt;every()&lt;/a&gt;&lt;/code&gt; - runs a function on items in the array while that function is returning true. It returns true if the function returns true for every item it could visit. &lt;/li&gt;&lt;li&gt; &lt;code&gt;&lt;a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:filter" title="Core JavaScript 1.5 Reference:Objects:Array:filter"&gt;filter()&lt;/a&gt;&lt;/code&gt; - runs a function on every item in the array and returns an array of all items for which the function returns true. &lt;/li&gt;&lt;li&gt; &lt;code&gt;&lt;a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:forEach" title="Core JavaScript 1.5 Reference:Objects:Array:forEach"&gt;forEach()&lt;/a&gt;&lt;/code&gt; - runs a function on every item in the array. &lt;/li&gt;&lt;li&gt; &lt;code&gt;&lt;a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:map" title="Core JavaScript 1.5 Reference:Objects:Array:map"&gt;map()&lt;/a&gt;&lt;/code&gt; - runs a function on every item in the array and returns the results in an array. &lt;/li&gt;&lt;li&gt; &lt;code&gt;&lt;a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:some" title="Core JavaScript 1.5 Reference:Objects:Array:some"&gt;some()&lt;/a&gt;&lt;/code&gt; - runs a function on items in the array while that function returns false. It returns true if the function returns true for any item it could visit. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;For more information, see Nicholas C. Zakas' article, &lt;span class="exlink"&gt;&lt;a href="http://developer.mozilla.org/en/docs/Mozilla%27s_New_Array_Methods_%28external%29" title="Mozilla's New Array Methods (external)"&gt;Mozilla's New Array Methods&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;&lt;h3&gt;Array and String Generics&lt;/h3&gt;&lt;p&gt;Sometimes you would like to apply array methods to strings. By doing this, you treat a string as an array of characters. For example, in order to check that every character in the variable &lt;var&gt;str&lt;/var&gt; is a letter, you would write: &lt;/p&gt;&lt;br /&gt;&lt;pre&gt;function isLetter(character) {&lt;br /&gt; return (character &amp;gt;= "a" &amp;amp;&amp; character &amp;lt;= "z");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (Array.prototype.every.call(str, isLetter))&lt;br /&gt; alert("The string '" + str + "' contains only letters!");&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;This notation is rather wasteful and JavaScript 1.6 introduces a generic shorthand:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;if (Array.every(str, isLetter))&lt;br /&gt; alert("The string '" + str + "' contains only letters!");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Similarly you can easily apply String methods to any object:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;var num = 15;&lt;br /&gt;alert(String.replace(num, /5/, '2'));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a name="See_also"&gt;&lt;/a&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;[from &lt;a href="http://developer.mozilla.org/en/docs/New_in_JavaScript_1.6"&gt;http://developer.mozilla.org/en/docs/New_in_JavaScript_1.6&lt;/a&gt;]&lt;br /&gt;&lt;br /&gt;Firefox 2 introduced &lt;a href="http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7"&gt;JavaScript 1.7&lt;/a&gt;, which has some quite interesting features like &lt;a href="http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7#Generators"&gt;generators &lt;/a&gt;and &lt;a href="http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7#Iterators"&gt;iterators&lt;/a&gt;. In the future, SpiderMonkey and Firefox will integrate the &lt;a href="http://en.wikipedia.org/wiki/Tamarin_%28JIT%29"&gt;Tamarin&lt;/a&gt; virtual machine, which today runs ActionScript 3.&lt;br /&gt;&lt;br /&gt;So JSFL developers gain some tools in Flash CS3 just from the SpiderMonkey update. As well, we added a number of new JSAPIs, which I'll talk about in a later post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-2391389684296164844?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/2391389684296164844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=2391389684296164844' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/2391389684296164844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/2391389684296164844'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2007/08/jsfl-updated-to-javascript-16-gains-e4x.html' title='JSFL updated to JavaScript 1.6, gains E4X'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-2554639274455407699</id><published>2007-08-10T12:07:00.000-07:00</published><updated>2007-08-10T12:24:32.805-07:00</updated><title type='text'>Links for Copy Motion as ActionScript 3</title><content type='html'>For those interested in the new Copy Motion as AS3 feature in Flash CS3, here are some good links to start you off:&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Adobe Resources&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://livedocs.adobe.com/flash/9.0/UsingFlash/help.html?content=WSDD95B99E-76A0-4ab4-AE08-2B8090D0A9CE.html"&gt;LiveDocs: Copy Motion as ActionScript 3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.adobe.com/go/vid0126"&gt;Video Tutorial by Chris Georgenes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.adobe.com/devnet/flash/articles/creating_animation_as3_05.html"&gt;Adobe Developer Center: Creating animation in ActionScript 3.0&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/motionXSD.html"&gt;LiveDocs: Motion XML Elements&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/motion/package-detail.html"&gt;LiveDocs: fl.motion package&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://robertpenner.com/presentations/rpenner_Animation_Workflows_in_Flash_CS3_FITC_2007.pdf"&gt;My FITC 2007 Presentation Slides&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Blogs&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.kevinhoyt.org/2007/04/25/flash-cs3-export-motion-xml/"&gt;Kevin Hoyt: Copy Motion as AS3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.adobe.com/rgalvan/2007/05/copy_motion_to_as3.html"&gt;Galvan on Flash: Copy Motion to ActionScript 3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.adobe.com/rgalvan/2007/06/using_copy_motion_to_actionscr.html"&gt;Galvan on Flash: Using Copy Motion to ActionScript 3 with Flex&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Enthusiasts&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.motionxml.com/"&gt;MotionXML.com&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-2554639274455407699?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/2554639274455407699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=2554639274455407699' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/2554639274455407699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/2554639274455407699'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2007/08/links-for-copy-motion-as-actionscript-3_10.html' title='Links for Copy Motion as ActionScript 3'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24694385.post-4246009571511521936</id><published>2007-08-10T11:55:00.001-07:00</published><updated>2007-08-10T11:52:30.893-07:00</updated><title type='text'>Welcome</title><content type='html'>... to my geosynchronous lair. Emerging from deep web hibernation, I've finally started my own blog.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Life at Adobe&lt;/h3&gt;In April 2006, I joined the Adobe Flash Authoring team as a software engineer, specializing in ActionScript and JSFL. I've always enjoyed creating tools for the Flash community. Now I have the privilege of expanding the Flash tool itself, together with a team of extremely talented people.&lt;br /&gt;&lt;br /&gt;When your colleagues can add C++ and JSFL features for you on demand, and they say, "here, enjoy your &lt;span style="font-style: italic;"&gt;new build of Flash&lt;/span&gt;"--now you're playing with power! At one point last year I said to my manager, "You know, I could really use some XML parsing in JSFL." Jethro says, "Sure, I'll look into that." Next thing I know, he's dropping in E4X himself. "Thanks, boss."&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Areas of Interest&lt;br /&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;In Flash CS3, &lt;span style="font-weight: bold;"&gt;Copy and Paste Motion&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;Copy Motion as ActionScript 3.0&lt;/span&gt; were my main responsibilities. These features are fairly simple to use in their core use cases. But there are lot of subtleties once you dig a little deeper, which I'd like to explore. &lt;/li&gt;&lt;li&gt;I've been working a lot with &lt;span style="font-weight: bold;"&gt;JSFL, &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;XML&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;E4X &lt;/span&gt;and, of course, &lt;span style="font-weight: bold;"&gt;AS3&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Tweening&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;easing &lt;/span&gt;and the &lt;span style="font-weight: bold;"&gt;Timeline &lt;/span&gt;are never boring.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I majored in philosophy, so the occasional "analog moment" may sneak in. =)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24694385-4246009571511521936?l=robertpenner.com%2Fflashblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/4246009571511521936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=24694385&amp;postID=4246009571511521936' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/4246009571511521936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24694385/posts/default/4246009571511521936'/><link rel='alternate' type='text/html' href='http://robertpenner.com/flashblog/2007/08/welcome_10.html' title='Welcome'/><author><name>Robert Penner</name><uri>http://www.blogger.com/profile/06046944304723209404</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13180903850182643219'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>11</thr:total></entry></feed>