<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Just Another Rant &#187; Downloads</title>
	<atom:link href="http://www.cruciallimit.com/blog/category/downloads/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cruciallimit.com/blog</link>
	<description>Rants and Commentary about Flash/WebDesign/Motion Graphics by Crucial Limit</description>
	<lastBuildDate>Sun, 15 Aug 2010 15:43:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>JSFL &#8211; Automate Getters and Setters Command</title>
		<link>http://www.cruciallimit.com/blog/58/jsfl-automate-getters-and-setters-command/</link>
		<comments>http://www.cruciallimit.com/blog/58/jsfl-automate-getters-and-setters-command/#comments</comments>
		<pubDate>Sun, 13 Aug 2006 16:41:40 +0000</pubDate>
		<dc:creator>Crucial</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.cruciallimit.com/blog/?p=58</guid>
		<description><![CDATA[Well my last JSFL attempt, as it turns out, wasn't such the bright idea I thought it might be when I sat down to build it. As Keith kindly pointed out "a template would be simpler". So hopefully this one may be a tad more useful. I've been doing a lot more development involving a [...]]]></description>
			<content:encoded><![CDATA[<p>Well <a href="http://www.cruciallimit.com/blog/?p=57" title="JSFL - Create Default File Command">my last JSFL attempt</a>, as it turns out, wasn't such the bright idea I thought it might be when I sat down to build it. As <a href="http://www.cruciallimit.com/blog/?p=57#comments" title="Keith Peters comment">Keith kindly pointed out</a> "a template would be simpler". So hopefully this one may be a tad more useful.</p>
<p>I've been doing a lot more development involving a lot of class file creation lately, and while I'm getting more and more comfortable with each class I create I find there are some things that are just a pain in the ass. I have been following the OOP convention of writing implicit getters and setters in my class files. For those not familiar with what I'm talking about I would recommend picking up a copy of <a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&amp;path=ASIN/1590596196&amp;tag=cruciallimit-20&amp;camp=1789&amp;creative=9325" title="Object Oriented Actionscript for Flash 8" target="_blank">Object Oriented ActionScript for Flash 8</a>. However to give a quick overview, when writing properties in your class files, instead of allowing instances of the class to directly access the properties, its recommended that you define getter methods that provide read access and setter methods that provide write access to a the property. Consider the following example:</p>
<p><code>private var __myProperty : String;</code><code>// Getters and Setters<br />
public function get _myProperty(Void) : String<br />
{<br />
return __myProperty;<br />
}<br />
public function set _myProperty(newValue : String) : Void<br />
{<br />
__myProperty = newValue;<br />
} </code></p>
<p>The above example illustrates the aforementioned pain in the ass I spoke of. I understand the need for the code to be written this way and don't have a problem with the concept, but I'm lazy and hate doing things more than once if I can avoid it. Following the convention of writing implicit getters and setters now means I need to write (at minimum) 9 lines of code for every property I include in my class (not including comments or documentation).</p>
<p>This brought up the idea to create a command to automate this for me since in most cases my getters and setters happen to be very basic. This time though I thought I'd save some time and find out if there was a faster way to do it than a JSFL command or see if someone else had already beat me to the punch. As luck would have it, <a href="http://www.jessewarden.com" title="Jesse Warden" target="_blank">Jesse Warden</a> had <a href="http://www.jessewarden.com/archives/2004/06/jxl_property_co.html" title="JXL Property Code Writer" target="_blank">already built such a script</a>. It allows you to create getter and setter code along with the initial property code via a simple form inside Flash. Jesse was also kind enough to provide the source code that gave me a great (almost already complete) springboard to which I could make a command to build a getters and setters command that follows the coding convention I use in my class files.</p>
<p>This brings us to the point of this post (yeah I'm a bit long winded), my Getters/Setters command. I took Jesses code and built upon it to end up with a JSFL extension that provides the following:</p>
<p>• <strong>Writes the property code</strong> - allowing you to specify static/public/private attributes (default is private), data type, and initial value<br />
• <strong>Writes the Getter and Setter code</strong> (including comments)<br />
• <strong>Writes </strong><a href="http://www.as2doc.com/" title="AS2DOC website" target="_blank"><strong>AS2DOC</strong></a><strong> comments</strong> for documentation output<br />
• <strong>Outputs code to the Actions Panel</strong> as well as the output window</p>
<p>Nothing too fancy, and really most of the work was Jesse's. I reordered a few things for input speed and added a small amount of code to what was already a great script. Just thought I'd pass it along (with Jesse's blessing) in case anyone else may benefit from it.</p>
<p><a href="http://www.cruciallimit.com/blog/experiments/jsfl/CL_GettersSetters.mxp" title="Download Getters/Setters extension" target="_blank">Download (.mxp)</a> | <a href="http://www.cruciallimit.com/blog/experiments/jsfl/CL_GettersSetters_source/CL_GettersSetters_source.zip" target="_blank" title="Download Getters/Setters Source Code">Source Code (.zip)</a></p>
<p>Now if JSFL only worked in <a href="http://www.sepy.it/" title="SE|PY Actionscript Editor" target="_blank">SE|PY</a> I'd be in really happy <img src='http://www.cruciallimit.com/blog/smilies/yahoo_wink.gif' alt='&#59;&#41;' class='wp-smiley' width='18' height='18' title='&#59;&#41;' /></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.cruciallimit.com%2Fblog%2F58%2Fjsfl-automate-getters-and-setters-command%2F';
  addthis_title  = 'JSFL+%26%238211%3B+Automate+Getters+and+Setters+Command';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.cruciallimit.com/blog/58/jsfl-automate-getters-and-setters-command/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JSFL &#8211; Create Default File Command</title>
		<link>http://www.cruciallimit.com/blog/57/jsfl-create-default-file-command/</link>
		<comments>http://www.cruciallimit.com/blog/57/jsfl-create-default-file-command/#comments</comments>
		<pubDate>Sun, 16 Jul 2006 17:24:18 +0000</pubDate>
		<dc:creator>Crucial</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.cruciallimit.com/blog/?p=57</guid>
		<description><![CDATA[As I mentioned in a previous post, I was looking for a reason to get off my butt and explore the JSFL library for Extending Flash. So I decided to make a really simple script that could save me a bit of time. Every time I create a new Flash file I always spend the [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in a <a href="http://www.cruciallimit.com/blog/?p=54" title="Extending Flash">previous post</a>, I was looking for a reason to get off my butt and explore the <a href="http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?href=Part7_Extending.html" title="JSFL on LiveDocs" target="_blank">JSFL library</a> for Extending Flash. So I decided to make a really simple script that could save me a bit of time. Every time I create a new Flash file I always spend the first few minutes setting up my library, layers, framerate etc... Now I know you can make your framerate as part of the default file template, but I thought I'd add it in anyway.</p>
<p>It's nothing fancy but it was a cool project for me to get my feet wet with JSFL. Here's what the extension does:</p>
<p>• <strong>Sets Frame</strong> - rate to 31fps<br />
• <strong>Creates basic layers</strong> -<br />
---- actions : a layer for all code<br />
---- interface : a layer for interface elements<br />
---- background : a layer to place the background graphic or color box<br />
---- trace : a guide layer for placing graphics used for placement only<br />
• <strong>Creates basic folders in the library</strong> -<br />
---- Audio : place your sound files in here<br />
---- Bitmaps : place your imported images in here<br />
---- Buttons : place your button symbols in here<br />
---- Components : place your components in here<br />
---- Graphics : place your graphic symbols in here<br />
---- Movies : place your MovieClip symbols in here<br />
• <strong>Locks actions layer</strong> prevents stage elements from being placed on that layer</p>
<p>Once installed you can access the command "<strong>Create Default File</strong>" from the Flash Commands Menu.</p>
<p>I'd like to figure out a way to have it automatically run this command every time I create a new file, but I haven't figured out if that's even possible yet. I picked up the <a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&amp;path=ASIN/1590593049&amp;tag=cruciallimit-20&amp;camp=1789&amp;creative=9325" title="Extending Flash MX 2004 book by Keith Peters and Todd yard " target="_blank">Extending Flash MX 2004 book by Keith Peters and Todd yard</a> as well, it's always good to have a nice reference handy.<br />
<a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&amp;path=ASIN/1590593049&amp;tag=cruciallimit-20&amp;camp=1789&amp;creative=9325" title="Extending Flash MX 2004 book by Keith Peters and Todd yard " target="_blank"><img src="/blog/images/extendingFlash.jpg" border="0" /></a><img src="http://www.assoc-amazon.com/e/ir?t=cruciallimit-20&amp;l=as2&amp;o=1&amp;a=1590593049" style="border: medium none ; margin: 0px" border="0" height="1" width="1" /></p>
<p><a href="http://www.cruciallimit.com/blog/experiments/jsfl/CL_DefaultFile.mxp" target="_blank" title="Download : CL_DefaultFile,mxp extension">Download (.mxp)</a> | <a href="http://www.cruciallimit.com/blog/experiments/jsfl/CL_DefaultFile_source/Create%20Default%20File.jsfl" target="_blank" title="Download : CL_DefaultFile.jsfl source file">Source (.jsfl)</a></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.cruciallimit.com%2Fblog%2F57%2Fjsfl-create-default-file-command%2F';
  addthis_title  = 'JSFL+%26%238211%3B+Create+Default+File+Command';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.cruciallimit.com/blog/57/jsfl-create-default-file-command/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
