<?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>Kommentarer til: ActionScript 3.0: how to add property to eventListener</title>
	<atom:link href="http://www.campjohn.dk/wp/?feed=rss2&#038;p=114" rel="self" type="application/rss+xml" />
	<link>http://www.campjohn.dk/wp/?p=114</link>
	<description>cases, code, tips and guidance</description>
	<lastBuildDate>Thu, 02 Sep 2010 06:17:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Af: admin</title>
		<link>http://www.campjohn.dk/wp/?p=114&#038;cpage=1#comment-267</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sat, 12 Dec 2009 19:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://felisan.wordpress.com/?p=107#comment-267</guid>
		<description>actually Tristan, you&#039;re right, it&#039;s a property, not a parameter.
and therefore the post has been edited :)
but besides from that, I&#039;ve been passing on parame.... erhm, properties to objects like in the example above in lots and lots of files without getting into any trouble.

please let me know if you get into any kind of problem using the code example above.
thanks</description>
		<content:encoded><![CDATA[<p>actually Tristan, you&#8217;re right, it&#8217;s a property, not a parameter.<br />
and therefore the post has been edited <img src='http://www.campjohn.dk/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
but besides from that, I&#8217;ve been passing on parame&#8230;. erhm, properties to objects like in the example above in lots and lots of files without getting into any trouble.</p>
<p>please let me know if you get into any kind of problem using the code example above.<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Af: Tristan</title>
		<link>http://www.campjohn.dk/wp/?p=114&#038;cpage=1#comment-266</link>
		<dc:creator>Tristan</dc:creator>
		<pubDate>Sat, 12 Dec 2009 00:44:38 +0000</pubDate>
		<guid isPermaLink="false">http://felisan.wordpress.com/?p=107#comment-266</guid>
		<description>When you say &quot;parameter,&quot; do you really mean &quot;property&quot;?

At any rate, doesn&#039;t adding a property to an object without using &quot;var&quot; generate an error in AS 3?</description>
		<content:encoded><![CDATA[<p>When you say &#8220;parameter,&#8221; do you really mean &#8220;property&#8221;?</p>
<p>At any rate, doesn&#8217;t adding a property to an object without using &#8220;var&#8221; generate an error in AS 3?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Af: admin</title>
		<link>http://www.campjohn.dk/wp/?p=114&#038;cpage=1#comment-265</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 09 Dec 2009 14:16:14 +0000</pubDate>
		<guid isPermaLink="false">http://felisan.wordpress.com/?p=107#comment-265</guid>
		<description>you can only add those type of parameters to MovieClips. neither buttons nor Sprites will accept parameters. you can extend the Sprite class to accept parameters though :)</description>
		<content:encoded><![CDATA[<p>you can only add those type of parameters to MovieClips. neither buttons nor Sprites will accept parameters. you can extend the Sprite class to accept parameters though <img src='http://www.campjohn.dk/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Af: Thomas Link</title>
		<link>http://www.campjohn.dk/wp/?p=114&#038;cpage=1#comment-257</link>
		<dc:creator>Thomas Link</dc:creator>
		<pubDate>Sun, 29 Nov 2009 13:33:56 +0000</pubDate>
		<guid isPermaLink="false">http://felisan.wordpress.com/?p=107#comment-257</guid>
		<description>Assigning the desired parameter to the item itself seems to be very clever. (e.g. blueBox._color = 0×0000FF; …) 

This won’t work with buttons. I think there has to be a movieclip around the button and you will have to use event bubbling (?) to catch the CLICK event on the movieclip.

Any other ideas?</description>
		<content:encoded><![CDATA[<p>Assigning the desired parameter to the item itself seems to be very clever. (e.g. blueBox._color = 0×0000FF; …) </p>
<p>This won’t work with buttons. I think there has to be a movieclip around the button and you will have to use event bubbling (?) to catch the CLICK event on the movieclip.</p>
<p>Any other ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Af: Zashkaser</title>
		<link>http://www.campjohn.dk/wp/?p=114&#038;cpage=1#comment-183</link>
		<dc:creator>Zashkaser</dc:creator>
		<pubDate>Wed, 05 Aug 2009 16:38:34 +0000</pubDate>
		<guid isPermaLink="false">http://felisan.wordpress.com/?p=107#comment-183</guid>
		<description>Nice site. go to my favorites. TNx</description>
		<content:encoded><![CDATA[<p>Nice site. go to my favorites. TNx</p>
]]></content:encoded>
	</item>
	<item>
		<title>Af: Damir Asanov</title>
		<link>http://www.campjohn.dk/wp/?p=114&#038;cpage=1#comment-182</link>
		<dc:creator>Damir Asanov</dc:creator>
		<pubDate>Sun, 02 Aug 2009 14:05:26 +0000</pubDate>
		<guid isPermaLink="false">http://felisan.wordpress.com/?p=107#comment-182</guid>
		<description>var boxes:Array = [blueBox, redBox, yellowBox, blackBox, whiteBox];
var colors:Array = [&quot;0x0000FF&quot;, &quot;0xFF0000&quot;, &quot;0xFFFF00&quot;, &quot;0x000000&quot;, &quot;0xFFFFFF&quot;];

for (var i:Number = 0; i&lt;boxes.length; i++){
    boxes[i].addEventListener(MouseEvent.CLICK, changeColor);
}
function changeColor(e:MouseEvent):void{
    Tweener.addTween(this.bigBox, {color:colors[boxes.indexOf(e.currentTarget)], time:1, transition:&quot;linear&quot;});
 }

//--------
//i think this is the best way if there are more than three boxes and colors</description>
		<content:encoded><![CDATA[<p>var boxes:Array = [blueBox, redBox, yellowBox, blackBox, whiteBox];<br />
var colors:Array = ["0x0000FF", "0xFF0000", "0xFFFF00", "0x000000", "0xFFFFFF"];</p>
<p>for (var i:Number = 0; i&lt;boxes.length; i++){<br />
    boxes[i].addEventListener(MouseEvent.CLICK, changeColor);<br />
}<br />
function changeColor(e:MouseEvent):void{<br />
    Tweener.addTween(this.bigBox, {color:colors[boxes.indexOf(e.currentTarget)], time:1, transition:&#8221;linear&#8221;});<br />
 }</p>
<p>//&#8212;&#8212;&#8211;<br />
//i think this is the best way if there are more than three boxes and colors</p>
]]></content:encoded>
	</item>
	<item>
		<title>Af: felisan</title>
		<link>http://www.campjohn.dk/wp/?p=114&#038;cpage=1#comment-50</link>
		<dc:creator>felisan</dc:creator>
		<pubDate>Mon, 23 Jun 2008 18:06:15 +0000</pubDate>
		<guid isPermaLink="false">http://felisan.wordpress.com/?p=107#comment-50</guid>
		<description>hi Mat.

glad you could use it - the bigBox is a movieclip from the library... alternatively you could just place a movieclip on stage and instancename it bigBox.

easy as pie :O)</description>
		<content:encoded><![CDATA[<p>hi Mat.</p>
<p>glad you could use it &#8211; the bigBox is a movieclip from the library&#8230; alternatively you could just place a movieclip on stage and instancename it bigBox.</p>
<p>easy as pie :O)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Af: mat</title>
		<link>http://www.campjohn.dk/wp/?p=114&#038;cpage=1#comment-49</link>
		<dc:creator>mat</dc:creator>
		<pubDate>Mon, 23 Jun 2008 14:26:08 +0000</pubDate>
		<guid isPermaLink="false">http://felisan.wordpress.com/?p=107#comment-49</guid>
		<description>Thanks for the help, been looking every where for this answer.  Ony one question I don&#039;t undersatnd where you get &quot;bigBox&quot; from.
//
Tweener.addTween(this.bigBox, {_color:e.target._color, time:1, transition:”linear”});
}

Regards
Mat</description>
		<content:encoded><![CDATA[<p>Thanks for the help, been looking every where for this answer.  Ony one question I don&#8217;t undersatnd where you get &#8220;bigBox&#8221; from.<br />
//<br />
Tweener.addTween(this.bigBox, {_color:e.target._color, time:1, transition:”linear”});<br />
}</p>
<p>Regards<br />
Mat</p>
]]></content:encoded>
	</item>
</channel>
</rss>
