<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Custom Events in AS 3.0 (don&#8217;t forget to override the clone method)</title>
	<atom:link href="http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/</link>
	<description>Flash Platform development and personal rants.</description>
	<lastBuildDate>Fri, 12 Mar 2010 13:29:20 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rick</title>
		<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-203527</link>
		<dc:creator>Rick</dc:creator>
		<pubDate>Fri, 12 Mar 2010 13:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-203527</guid>
		<description>Hmm.. I wrote a really simple example of dispatching custom events in as3. You can see it at my blog here: http://www.as3blog.org/?p=75</description>
		<content:encoded><![CDATA[<p>Hmm.. I wrote a really simple example of dispatching custom events in as3. You can see it at my blog here: <a href="http://www.as3blog.org/?p=75" rel="nofollow">http://www.as3blog.org/?p=75</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flash和Flex开发者都需要知道的20 件事 &#124; kiss the rain</title>
		<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-203432</link>
		<dc:creator>Flash和Flex开发者都需要知道的20 件事 &#124; kiss the rain</dc:creator>
		<pubDate>Thu, 11 Mar 2010 06:26:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-203432</guid>
		<description>[...] http://livedocs.adobe.com/flex/3/langref/flash/events/package-detail.html http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://livedocs.adobe.com/flex/3/langref/flash/events/package-detail.html" rel="nofollow">http://livedocs.adobe.com/flex/3/langref/flash/events/package-detail.html</a> <a href="http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/" rel="nofollow">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Custom Events + Robotlegs + dispatch + Overriding the clone() method &#124; Steven&#8217;s Rant&#8230;</title>
		<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202951</link>
		<dc:creator>Custom Events + Robotlegs + dispatch + Overriding the clone() method &#124; Steven&#8217;s Rant&#8230;</dc:creator>
		<pubDate>Thu, 04 Mar 2010 06:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202951</guid>
		<description>[...] to share a quick gotcha. It&#8217;s really not a gotcha, and really more something I forgot to do. Click here to see the post that helped jog my memory on this one. Hope this will come in handy for [...]</description>
		<content:encoded><![CDATA[<p>[...] to share a quick gotcha. It&#8217;s really not a gotcha, and really more something I forgot to do. Click here to see the post that helped jog my memory on this one. Hope this will come in handy for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 管中窥信息 &#187; Flash开发必须知道的10件事</title>
		<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202911</link>
		<dc:creator>管中窥信息 &#187; Flash开发必须知道的10件事</dc:creator>
		<pubDate>Mon, 01 Mar 2010 00:49:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202911</guid>
		<description>[...] http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/" rel="nofollow">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: visioncoding in english &#187; Blog Archive &#187; 10 Things Every Senior Flash Developer Should Know</title>
		<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202781</link>
		<dc:creator>visioncoding in english &#187; Blog Archive &#187; 10 Things Every Senior Flash Developer Should Know</dc:creator>
		<pubDate>Mon, 22 Feb 2010 11:27:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202781</guid>
		<description>[...] http://livedocs.adobe.com/flex/3/langref/flash/events/package-detail.html http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://livedocs.adobe.com/flex/3/langref/flash/events/package-detail.html" rel="nofollow">http://livedocs.adobe.com/flex/3/langref/flash/events/package-detail.html</a> <a href="http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/" rel="nofollow">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flash开发者需要知道的10件事 &#124; Adobe Show Center</title>
		<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202742</link>
		<dc:creator>Flash开发者需要知道的10件事 &#124; Adobe Show Center</dc:creator>
		<pubDate>Sat, 20 Feb 2010 02:29:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202742</guid>
		<description>[...] http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/" rel="nofollow">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flash开发者需要知道的10件事 - Geeky Derek</title>
		<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202737</link>
		<dc:creator>Flash开发者需要知道的10件事 - Geeky Derek</dc:creator>
		<pubDate>Fri, 19 Feb 2010 22:14:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202737</guid>
		<description>[...] http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/" rel="nofollow">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Norris&#39;s Landscape &#187; [转]Flex开发者需要知道的10件事</title>
		<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202729</link>
		<dc:creator>Norris&#39;s Landscape &#187; [转]Flex开发者需要知道的10件事</dc:creator>
		<pubDate>Fri, 19 Feb 2010 06:28:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202729</guid>
		<description>[...] http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/" rel="nofollow">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 10 ข้อที่นักพัฒนา flash ควรรู้ &#171; visioncoding.com</title>
		<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202198</link>
		<dc:creator>10 ข้อที่นักพัฒนา flash ควรรู้ &#171; visioncoding.com</dc:creator>
		<pubDate>Wed, 27 Jan 2010 16:57:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-202198</guid>
		<description>[...] http://livedocs.adobe.com/flex/3/langref/flash/events/package-detail.html http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/ http://jacwright.com/blog/70/how-to-listen-to-flash-events-that-dont-bubble/ Statements, Keywords, [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://livedocs.adobe.com/flex/3/langref/flash/events/package-detail.html" rel="nofollow">http://livedocs.adobe.com/flex/3/langref/flash/events/package-detail.html</a> <a href="http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/" rel="nofollow">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/</a> <a href="http://jacwright.com/blog/70/how-to-listen-to-flash-events-that-dont-bubble/" rel="nofollow">http://jacwright.com/blog/70/how-to-listen-to-flash-events-that-dont-bubble/</a> Statements, Keywords, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cardin</title>
		<link>http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-201798</link>
		<dc:creator>Cardin</dc:creator>
		<pubDate>Sat, 09 Jan 2010 03:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/#comment-201798</guid>
		<description>Thank you for your post. The thing about the Event.clone() method is completely out of the blue, I got an error message that fortunately was solved by overriding clone().

How I got this error: I created a custom class FlyEvent that inherited Event. Then using the standard EventDispatcher, i dispatchEvent() the custom event twice. The first time it got routed by a parent .addEventListener, which captured it as FlyEvent, and dispatched it again by casting it to Event again.

This double-casting caused the following error. I think it will be helpful to others in identifying the cause behind the error. =)

TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@10edb521 to src.Creature.Events.FlyEvent.
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at src.Creature::FlyManager$/broadcastEvent()
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at src.Creature::Fly/deathSequence()
	at src.Creature::Fly/movement()
	at flash.utils::Timer/_timerDispatch()
	at flash.utils::Timer/tick()
TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@10edb521 to src.Creature.Events.FlyEvent.
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at src.Creature::FlyManager$/broadcastEvent()
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at src.Creature::Fly/deathSequence()
	at src.Creature::Fly/movement()
	at flash.utils::Timer/_timerDispatch()
	at flash.utils::Timer/tick()</description>
		<content:encoded><![CDATA[<p>Thank you for your post. The thing about the Event.clone() method is completely out of the blue, I got an error message that fortunately was solved by overriding clone().</p>
<p>How I got this error: I created a custom class FlyEvent that inherited Event. Then using the standard EventDispatcher, i dispatchEvent() the custom event twice. The first time it got routed by a parent .addEventListener, which captured it as FlyEvent, and dispatched it again by casting it to Event again.</p>
<p>This double-casting caused the following error. I think it will be helpful to others in identifying the cause behind the error. =)</p>
<p>TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@10edb521 to src.Creature.Events.FlyEvent.<br />
	at flash.events::EventDispatcher/dispatchEventFunction()<br />
	at flash.events::EventDispatcher/dispatchEvent()<br />
	at src.Creature::FlyManager$/broadcastEvent()<br />
	at flash.events::EventDispatcher/dispatchEventFunction()<br />
	at flash.events::EventDispatcher/dispatchEvent()<br />
	at src.Creature::Fly/deathSequence()<br />
	at src.Creature::Fly/movement()<br />
	at flash.utils::Timer/_timerDispatch()<br />
	at flash.utils::Timer/tick()<br />
TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@10edb521 to src.Creature.Events.FlyEvent.<br />
	at flash.events::EventDispatcher/dispatchEventFunction()<br />
	at flash.events::EventDispatcher/dispatchEvent()<br />
	at src.Creature::FlyManager$/broadcastEvent()<br />
	at flash.events::EventDispatcher/dispatchEventFunction()<br />
	at flash.events::EventDispatcher/dispatchEvent()<br />
	at src.Creature::Fly/deathSequence()<br />
	at src.Creature::Fly/movement()<br />
	at flash.utils::Timer/_timerDispatch()<br />
	at flash.utils::Timer/tick()</p>
]]></content:encoded>
	</item>
</channel>
</rss>
