<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Using EventDispatcher in AS2, the AS3 way</title>
	<atom:link href="http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/</link>
	<description>I Flash und I Flex Jaaaa</description>
	<pubDate>Fri, 05 Sep 2008 21:41:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: obie</title>
		<link>http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/#comment-550</link>
		<dc:creator>obie</dc:creator>
		<pubDate>Tue, 19 Aug 2008 09:15:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.sakri.net/blog/?p=4#comment-550</guid>
		<description>hmmm - when i use this the _target never gets set in the event (NOTE: there was a typo in the constructor where the leading _ on _target was left out but that wasn't my problem)</description>
		<content:encoded><![CDATA[<p>hmmm - when i use this the _target never gets set in the event (NOTE: there was a typo in the constructor where the leading _ on _target was left out but that wasn&#8217;t my problem)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergio</title>
		<link>http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/#comment-544</link>
		<dc:creator>Sergio</dc:creator>
		<pubDate>Fri, 01 Aug 2008 21:03:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.sakri.net/blog/?p=4#comment-544</guid>
		<description>So this looks like what I am trying to accomplish, but how would I use it?  Can you give a complete usage sample?  Say, to listen for a movieclip.onRollOver event?</description>
		<content:encoded><![CDATA[<p>So this looks like what I am trying to accomplish, but how would I use it?  Can you give a complete usage sample?  Say, to listen for a movieclip.onRollOver event?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/#comment-531</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Fri, 18 Jul 2008 02:48:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.sakri.net/blog/?p=4#comment-531</guid>
		<description>Nevermind! Silly question...don't know what I was thinking. I didn't think that I can just pass an object to the constructor!</description>
		<content:encoded><![CDATA[<p>Nevermind! Silly question&#8230;don&#8217;t know what I was thinking. I didn&#8217;t think that I can just pass an object to the constructor!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/#comment-530</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Fri, 18 Jul 2008 02:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.sakri.net/blog/?p=4#comment-530</guid>
		<description>Cheers for the class mate, very nice. It alleviates a lot of the bitchy aspects of the EventDispatcher.initialize(this) method that caused me much pain in the past. Anyhow, how would you propose I pass data along with the event? Should I make a custom event class as in AS3? Thanks again...</description>
		<content:encoded><![CDATA[<p>Cheers for the class mate, very nice. It alleviates a lot of the bitchy aspects of the EventDispatcher.initialize(this) method that caused me much pain in the past. Anyhow, how would you propose I pass data along with the event? Should I make a custom event class as in AS3? Thanks again&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/#comment-511</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Wed, 07 May 2008 13:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.sakri.net/blog/?p=4#comment-511</guid>
		<description>thank you!</description>
		<content:encoded><![CDATA[<p>thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sakri</title>
		<link>http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/#comment-510</link>
		<dc:creator>sakri</dc:creator>
		<pubDate>Tue, 06 May 2008 15:16:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.sakri.net/blog/?p=4#comment-510</guid>
		<description>HI Mattias,

I guess you could extend MovieClip with a EventDispatchingMovieClip like so:

import mx.events.EventDispatcher;

class EventDispatchingMovieClip extends MovieClip{

     public function EventDispatchingMovieClip(){
         EventDispatcher.initialize(this);
     }

     public function dispatchEvent(){}
     public function addEventListener(){}
     public function removeEventListener(){}
}

(sorry about the formatting, I thought I had a code formatting plugin but it seems to be malfunctioning :(  ).


Then, whenever you need dispatching, instead of extending MovieClip, extend EventDispatchingMovieClip... Purists prefer composition over inheritance, but let's face it, this was a hack to begin with :D</description>
		<content:encoded><![CDATA[<p>HI Mattias,</p>
<p>I guess you could extend MovieClip with a EventDispatchingMovieClip like so:</p>
<p>import mx.events.EventDispatcher;</p>
<p>class EventDispatchingMovieClip extends MovieClip{</p>
<p>     public function EventDispatchingMovieClip(){<br />
         EventDispatcher.initialize(this);<br />
     }</p>
<p>     public function dispatchEvent(){}<br />
     public function addEventListener(){}<br />
     public function removeEventListener(){}<br />
}</p>
<p>(sorry about the formatting, I thought I had a code formatting plugin but it seems to be malfunctioning <img src='http://www.sakri.net/blog/wp-includes/images/smilies/frown_sakri_blue.gif' alt=':(' class='wp-smiley' />  ).</p>
<p>Then, whenever you need dispatching, instead of extending MovieClip, extend EventDispatchingMovieClip&#8230; Purists prefer composition over inheritance, but let&#8217;s face it, this was a hack to begin with <img src='http://www.sakri.net/blog/wp-includes/images/smilies/biggrin_sakri_blue.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/#comment-509</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Tue, 06 May 2008 14:35:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.sakri.net/blog/?p=4#comment-509</guid>
		<description>but the clunky way to “shove in” the code of EventDispatcher allowed us to shove it right into classes extending MovieClip. How can I use your attempt for that? In AS3 MovieClip already extends EventDispatcher, but in AS2 it does NOT. Any ideas?</description>
		<content:encoded><![CDATA[<p>but the clunky way to “shove in” the code of EventDispatcher allowed us to shove it right into classes extending MovieClip. How can I use your attempt for that? In AS3 MovieClip already extends EventDispatcher, but in AS2 it does NOT. Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sakri</title>
		<link>http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/#comment-21</link>
		<dc:creator>sakri</dc:creator>
		<pubDate>Thu, 05 Jul 2007 09:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.sakri.net/blog/?p=4#comment-21</guid>
		<description>thank you Btzghdmaeo, you've made my day! 

However, I'm not sure I fully understand when you say "jrinasbvlwnt", do you mean it in a derogatory manner? sounds rather hostile?

thanks again!

kthxbye</description>
		<content:encoded><![CDATA[<p>thank you Btzghdmaeo, you&#8217;ve made my day! </p>
<p>However, I&#8217;m not sure I fully understand when you say &#8220;jrinasbvlwnt&#8221;, do you mean it in a derogatory manner? sounds rather hostile?</p>
<p>thanks again!</p>
<p>kthxbye</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: btzghdmaeo</title>
		<link>http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/#comment-19</link>
		<dc:creator>btzghdmaeo</dc:creator>
		<pubDate>Thu, 05 Jul 2007 06:42:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.sakri.net/blog/?p=4#comment-19</guid>
		<description>Hello! Good Site! Thanks you! jrinasbvlwnt</description>
		<content:encoded><![CDATA[<p>Hello! Good Site! Thanks you! jrinasbvlwnt</p>
]]></content:encoded>
	</item>
</channel>
</rss>
