<?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: AS3 Custom Event for Passing Unlimited Parameters</title>
	<atom:link href="http://www.xllusion.net/ed/2008/01/21/as3-custom-event-for-passing-unlimited-parameters/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xllusion.net/ed/2008/01/21/as3-custom-event-for-passing-unlimited-parameters/</link>
	<description>Flash, Actionscript, Javascript, PHP and more?</description>
	<pubDate>Tue, 06 Jan 2009 09:57:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Slav</title>
		<link>http://www.xllusion.net/ed/2008/01/21/as3-custom-event-for-passing-unlimited-parameters/comment-page-1/#comment-1806</link>
		<dc:creator>Slav</dc:creator>
		<pubDate>Mon, 08 Sep 2008 14:00:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.xllusion.net/ed/2008/01/20/as3-custom-event-for-passing-unlimited-parameters/#comment-1806</guid>
		<description>Cool, :))))))
Thx a lot, this is very usefully.</description>
		<content:encoded><![CDATA[<p>Cool, :))))))<br />
Thx a lot, this is very usefully.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://www.xllusion.net/ed/2008/01/21/as3-custom-event-for-passing-unlimited-parameters/comment-page-1/#comment-1805</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Mon, 08 Sep 2008 10:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.xllusion.net/ed/2008/01/20/as3-custom-event-for-passing-unlimited-parameters/#comment-1805</guid>
		<description>You can't use EventType on MC since they have built-in dispatchEvent... but if the MC is dynamic, you can add variables to MC in run-time, e.g-

kub.data = "Test"
kub.addEventListener("mouseDown", down);
function down(e:Event){
trace(e.target.data);
}

Note: MC needs to have customized class that extends MovieClip and has dynamic attribute, you create dynamic classes by using the dynamic attribute when you declare a class, e.g- "dynamic class kub"</description>
		<content:encoded><![CDATA[<p>You can&#8217;t use EventType on MC since they have built-in dispatchEvent&#8230; but if the MC is dynamic, you can add variables to MC in run-time, e.g-</p>
<p>kub.data = &#8220;Test&#8221;<br />
kub.addEventListener(&#8221;mouseDown&#8221;, down);<br />
function down(e:Event){<br />
trace(e.target.data);<br />
}</p>
<p>Note: MC needs to have customized class that extends MovieClip and has dynamic attribute, you create dynamic classes by using the dynamic attribute when you declare a class, e.g- &#8220;dynamic class kub&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Slav</title>
		<link>http://www.xllusion.net/ed/2008/01/21/as3-custom-event-for-passing-unlimited-parameters/comment-page-1/#comment-1804</link>
		<dc:creator>Slav</dc:creator>
		<pubDate>Mon, 08 Sep 2008 08:26:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.xllusion.net/ed/2008/01/20/as3-custom-event-for-passing-unlimited-parameters/#comment-1804</guid>
		<description>kub.dispatchEvent(new EventType("mouseDown", true, true, "slav"));

kub.addEventListener("mouseDown", down);

function down(e:EventType){
	
	trace(e.arg);
}

Is possible use that way?
p.s. "kub" is a MC.</description>
		<content:encoded><![CDATA[<p>kub.dispatchEvent(new EventType(&#8221;mouseDown&#8221;, true, true, &#8220;slav&#8221;));</p>
<p>kub.addEventListener(&#8221;mouseDown&#8221;, down);</p>
<p>function down(e:EventType){</p>
<p>	trace(e.arg);<br />
}</p>
<p>Is possible use that way?<br />
p.s. &#8220;kub&#8221; is a MC.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://www.xllusion.net/ed/2008/01/21/as3-custom-event-for-passing-unlimited-parameters/comment-page-1/#comment-1803</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Fri, 05 Sep 2008 18:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.xllusion.net/ed/2008/01/20/as3-custom-event-for-passing-unlimited-parameters/#comment-1803</guid>
		<description>The function that handle the event will need to be typed to "EventType" or post your code here.</description>
		<content:encoded><![CDATA[<p>The function that handle the event will need to be typed to &#8220;EventType&#8221; or post your code here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Slav</title>
		<link>http://www.xllusion.net/ed/2008/01/21/as3-custom-event-for-passing-unlimited-parameters/comment-page-1/#comment-1802</link>
		<dc:creator>Slav</dc:creator>
		<pubDate>Fri, 05 Sep 2008 11:55:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.xllusion.net/ed/2008/01/20/as3-custom-event-for-passing-unlimited-parameters/#comment-1802</guid>
		<description>I received that: TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::MouseEvent@30ab601 to EventType.

I understand what means, but i don't understand why? What am i doing wrong?</description>
		<content:encoded><![CDATA[<p>I received that: TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::MouseEvent@30ab601 to EventType.</p>
<p>I understand what means, but i don&#8217;t understand why? What am i doing wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://www.xllusion.net/ed/2008/01/21/as3-custom-event-for-passing-unlimited-parameters/comment-page-1/#comment-1796</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Wed, 23 Jul 2008 22:14:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.xllusion.net/ed/2008/01/20/as3-custom-event-for-passing-unlimited-parameters/#comment-1796</guid>
		<description>Feel free to change whatever u want but doesn't it mean that u will need to define the object variable every time u want a new parameter to pass on since the rest parameter only returns array? and u won't be able to pass unlimited parameters? 

e.g- 
public function EventType(type:String, bubbles:Boolean = false, cancelable:Boolean = false, ... a:*) {

super(type, bubbles, cancelable);
arg.size = a[0];
arg.type= a[1];
}

Unless u want to instantiate the EventType class first at client, e.g-

var e:EventType = new EventType("TYPE_NAME");
e.arg.size = "size";
e.arg.type = "type";
dispatchEvent(e);

But it will make the code much longer...</description>
		<content:encoded><![CDATA[<p>Feel free to change whatever u want but doesn&#8217;t it mean that u will need to define the object variable every time u want a new parameter to pass on since the rest parameter only returns array? and u won&#8217;t be able to pass unlimited parameters? </p>
<p>e.g-<br />
public function EventType(type:String, bubbles:Boolean = false, cancelable:Boolean = false, &#8230; a:*) {</p>
<p>super(type, bubbles, cancelable);<br />
arg.size = a[0];<br />
arg.type= a[1];<br />
}</p>
<p>Unless u want to instantiate the EventType class first at client, e.g-</p>
<p>var e:EventType = new EventType(&#8221;TYPE_NAME&#8221;);<br />
e.arg.size = &#8220;size&#8221;;<br />
e.arg.type = &#8220;type&#8221;;<br />
dispatchEvent(e);</p>
<p>But it will make the code much longer&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
