<?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: Passing Variables to A Function in ActionScript 3</title>
	<atom:link href="http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/</link>
	<description>Freelance Web Designer &#38; Flash Developer</description>
	<lastBuildDate>Tue, 09 Mar 2010 09:10:17 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: xirclebox</title>
		<link>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/comment-page-1/#comment-242</link>
		<dc:creator>xirclebox</dc:creator>
		<pubDate>Wed, 14 Oct 2009 00:10:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=320#comment-242</guid>
		<description>@kcreation ... Seeing as how this was written to help people who may run into this problem, I added your solution to the original post. Thanks for your input.</description>
		<content:encoded><![CDATA[<p>@kcreation &#8230; Seeing as how this was written to help people who may run into this problem, I added your solution to the original post. Thanks for your input.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PupilsWithScruples</title>
		<link>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/comment-page-1/#comment-240</link>
		<dc:creator>PupilsWithScruples</dc:creator>
		<pubDate>Thu, 08 Oct 2009 08:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=320#comment-240</guid>
		<description>Hell yes.  I&#039;m just learning AS3, and so far all of the AS3 tutorials on button behavior I&#039;ve come across tell you to write an event handler for every single state of every button instance, and then write a corresponding function for each event handler.  Nice if you have wussy buttons that all do the same thing, but absurdly inefficient otherwise.  Your post is the most graceful code I&#039;ve found on the topic.  Thanks!</description>
		<content:encoded><![CDATA[<p>Hell yes.  I&#8217;m just learning AS3, and so far all of the AS3 tutorials on button behavior I&#8217;ve come across tell you to write an event handler for every single state of every button instance, and then write a corresponding function for each event handler.  Nice if you have wussy buttons that all do the same thing, but absurdly inefficient otherwise.  Your post is the most graceful code I&#8217;ve found on the topic.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xirclebox</title>
		<link>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/comment-page-1/#comment-219</link>
		<dc:creator>xirclebox</dc:creator>
		<pubDate>Thu, 04 Jun 2009 02:47:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=320#comment-219</guid>
		<description>@Steve, what this piece of the code is doing is checking to see if the index of the &quot;b&quot; array is equal to the index of &quot;a&quot; array. That way the button name (e.currentTarget.name) will call the corresponding value from the &quot;a&quot; array. 

var b:Array = [home_btn, about_btn, contact_btn];
var a:Array = [&quot;index.html&quot;,&quot;about.html&quot;,&quot;contact.html&quot;];

If the target (e.currentTarget.name) is &quot;home_btn&quot; from the &quot;b&quot; array, the index is 0. When the button is clicked, it will correctly call the link &quot;index.html&quot; from the &quot;a&quot; array whose index is also 0</description>
		<content:encoded><![CDATA[<p>@Steve, what this piece of the code is doing is checking to see if the index of the &#8220;b&#8221; array is equal to the index of &#8220;a&#8221; array. That way the button name (e.currentTarget.name) will call the corresponding value from the &#8220;a&#8221; array. </p>
<p>var b:Array = [home_btn, about_btn, contact_btn];<br />
var a:Array = ["index.html","about.html","contact.html"];</p>
<p>If the target (e.currentTarget.name) is &#8220;home_btn&#8221; from the &#8220;b&#8221; array, the index is 0. When the button is clicked, it will correctly call the link &#8220;index.html&#8221; from the &#8220;a&#8221; array whose index is also 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/comment-page-1/#comment-218</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 04 Jun 2009 00:57:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=320#comment-218</guid>
		<description>What is the conditional here doing:

if (e.currentTarget.name == b[j].name) {
...
}

I assume something to keep the value from always being the last in the loop? But I&#039;m not sure what.</description>
		<content:encoded><![CDATA[<p>What is the conditional here doing:</p>
<p>if (e.currentTarget.name == b[j].name) {<br />
&#8230;<br />
}</p>
<p>I assume something to keep the value from always being the last in the loop? But I&#8217;m not sure what.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xirclebox</title>
		<link>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/comment-page-1/#comment-99</link>
		<dc:creator>xirclebox</dc:creator>
		<pubDate>Fri, 20 Mar 2009 02:19:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=320#comment-99</guid>
		<description>LOL!! AS3 requires a bit more coding than AS2. But to answer your question. When using &quot;addEventListener&quot;, you can&#039;t pass variables to the function.</description>
		<content:encoded><![CDATA[<p>LOL!! AS3 requires a bit more coding than AS2. But to answer your question. When using &#8220;addEventListener&#8221;, you can&#8217;t pass variables to the function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swadleys BBQ Restaurant Website &#171; Austin Saint Aubin&#8217;s Blog</title>
		<link>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/comment-page-1/#comment-94</link>
		<dc:creator>Swadleys BBQ Restaurant Website &#171; Austin Saint Aubin&#8217;s Blog</dc:creator>
		<pubDate>Thu, 12 Mar 2009 22:05:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=320#comment-94</guid>
		<description>[...] Passing Varibles to A Function in ActionScript 3 &#124; homer gaines [...]</description>
		<content:encoded><![CDATA[<p>[...] Passing Varibles to A Function in ActionScript 3 | homer gaines [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mihai</title>
		<link>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/comment-page-1/#comment-79</link>
		<dc:creator>Mihai</dc:creator>
		<pubDate>Sat, 28 Feb 2009 19:47:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=320#comment-79</guid>
		<description>This is soo complicated ... couldn&#039;t you just send A variable to A function???</description>
		<content:encoded><![CDATA[<p>This is soo complicated &#8230; couldn&#8217;t you just send A variable to A function???</p>
]]></content:encoded>
	</item>
</channel>
</rss>
