<?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: The Case for Standardized AS3 Formatting</title>
	<atom:link href="http://www.fiftyonereasons.com/2009/06/tha-case-for-standardized-as3-formatting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fiftyonereasons.com/2009/06/tha-case-for-standardized-as3-formatting/</link>
	<description>Interactive Media Development + Exploration</description>
	<lastBuildDate>Thu, 26 Jan 2012 12:10:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Adam Jowett</title>
		<link>http://www.fiftyonereasons.com/2009/06/tha-case-for-standardized-as3-formatting/comment-page-1/#comment-9</link>
		<dc:creator>Adam Jowett</dc:creator>
		<pubDate>Tue, 07 Jul 2009 03:34:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=50#comment-9</guid>
		<description>I think there is a slight mis-understanding, but thanks for the detailed response. 

I am all for using the $var method for variables passed to a method, use that currently so follow completely, I also use _var methodology for variables declared that are internal to a class, i.e. private vars, and use getters and setters if they need to be made available externally.

However if you do not declare instance names automatically in your flash settings, you need to declare anything with an instance name in it&#039;s associated class, for example;

If you have a Form.as class associated to a contact form, and on stage there is a submit button with an instance name of submitButton. If I have flash not naming instance names automatically, I am required to declare that submit button in the class as a public variable to make it available. So I would declare something like:

public var submitButton:GenericButton;

it is this scenario that I am not a huge fan of declaring public vars with the underscore notation. Just my 2c, but keep up the good work.</description>
		<content:encoded><![CDATA[<p>I think there is a slight mis-understanding, but thanks for the detailed response. </p>
<p>I am all for using the $var method for variables passed to a method, use that currently so follow completely, I also use _var methodology for variables declared that are internal to a class, i.e. private vars, and use getters and setters if they need to be made available externally.</p>
<p>However if you do not declare instance names automatically in your flash settings, you need to declare anything with an instance name in it&#8217;s associated class, for example;</p>
<p>If you have a Form.as class associated to a contact form, and on stage there is a submit button with an instance name of submitButton. If I have flash not naming instance names automatically, I am required to declare that submit button in the class as a public variable to make it available. So I would declare something like:</p>
<p>public var submitButton:GenericButton;</p>
<p>it is this scenario that I am not a huge fan of declaring public vars with the underscore notation. Just my 2c, but keep up the good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Fisher</title>
		<link>http://www.fiftyonereasons.com/2009/06/tha-case-for-standardized-as3-formatting/comment-page-1/#comment-8</link>
		<dc:creator>Matt Fisher</dc:creator>
		<pubDate>Mon, 06 Jul 2009 16:12:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=50#comment-8</guid>
		<description>Hey Adam, 

Let me try and clear up some of the characteristics of our A51 syntax for you as well as the reason behind them.

We use an _varname (underscore) for ANY variable that is global to the class, be it public or private. 

We use a $varname (dollar sign) for ANY param variable being passed into a method. Any variable created within a method, we be a normal variable name with no special characteristics. 

The reason for this is to allow us to see just by the variable name, what we can do with it.

The underscores really have no impact on stage assets. For instance if I had a ball in my library and made it a movie clip with a linkage of &#039;Ball&#039;, I would just initialize it as follows:

If it was global to the class: 
public var _ball:Ball = new Ball();
or
private var _ball:Ball = new Ball();

And if it was in a method:
private function foobar($ball:Ball):void {}

Finally if we initialize a ball from inside a method it would be as follows:
var ball:Ball = new Ball(); 

So as you can see the only usage of the $ and _ is in the ActionScript files not in any FLA.

I hope this clears up our ideas a little more, or maybe I am just misunderstanding what you mean by &quot;flash automatically instance name our stage assets&quot;. Either way, thanks for your comment and feel free to post any reccomendations or your personal syntax ideas, we would love to see them :).

- Matt Fisher 
A51 Integrated</description>
		<content:encoded><![CDATA[<p>Hey Adam, </p>
<p>Let me try and clear up some of the characteristics of our A51 syntax for you as well as the reason behind them.</p>
<p>We use an _varname (underscore) for ANY variable that is global to the class, be it public or private. </p>
<p>We use a $varname (dollar sign) for ANY param variable being passed into a method. Any variable created within a method, we be a normal variable name with no special characteristics. </p>
<p>The reason for this is to allow us to see just by the variable name, what we can do with it.</p>
<p>The underscores really have no impact on stage assets. For instance if I had a ball in my library and made it a movie clip with a linkage of &#8216;Ball&#8217;, I would just initialize it as follows:</p>
<p>If it was global to the class:<br />
public var _ball:Ball = new Ball();<br />
or<br />
private var _ball:Ball = new Ball();</p>
<p>And if it was in a method:<br />
private function foobar($ball:Ball):void {}</p>
<p>Finally if we initialize a ball from inside a method it would be as follows:<br />
var ball:Ball = new Ball(); </p>
<p>So as you can see the only usage of the $ and _ is in the ActionScript files not in any FLA.</p>
<p>I hope this clears up our ideas a little more, or maybe I am just misunderstanding what you mean by &#8220;flash automatically instance name our stage assets&#8221;. Either way, thanks for your comment and feel free to post any reccomendations or your personal syntax ideas, we would love to see them <img src='http://www.fiftyonereasons.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>- Matt Fisher<br />
A51 Integrated</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Jowett</title>
		<link>http://www.fiftyonereasons.com/2009/06/tha-case-for-standardized-as3-formatting/comment-page-1/#comment-7</link>
		<dc:creator>Adam Jowett</dc:creator>
		<pubDate>Mon, 06 Jul 2009 11:22:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=50#comment-7</guid>
		<description>Not a huge fan of the way the vars are formatted, but not a biggy. Main thing for me would be having the public vars with an underscore, considering not all of us let flash automatically instance name our stage assets, we have to declare them in the class, and having to instance name them with an underscore so that it fits with the class schema would be very odd.

So for me, lose the underscore for public vars.</description>
		<content:encoded><![CDATA[<p>Not a huge fan of the way the vars are formatted, but not a biggy. Main thing for me would be having the public vars with an underscore, considering not all of us let flash automatically instance name our stage assets, we have to declare them in the class, and having to instance name them with an underscore so that it fits with the class schema would be very odd.</p>
<p>So for me, lose the underscore for public vars.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

