<?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>rabidGadfly</title>
	<atom:link href="http://rabidgadfly.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rabidgadfly.com</link>
	<description>Simple Solutions to Nagging Coding Problems</description>
	<lastBuildDate>Wed, 19 Oct 2011 13:43:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>RabidGadfly Seeking Full Time Work in Massachusetts</title>
		<link>http://rabidgadfly.com/2011/10/seeking-flex-flash-coldfusion-job-massachusetts/</link>
		<comments>http://rabidgadfly.com/2011/10/seeking-flex-flash-coldfusion-job-massachusetts/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 15:59:50 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[01516]]></category>

		<guid isPermaLink="false">http://rabidgadfly.com/?p=549</guid>
		<description><![CDATA[I was notified on Friday that the entire web development team at my company, Pongo Resume, will be laid off at the end of this month. I&#8217;ve been a full-time web developer for 8 years. The majority of my time at Pongo was spent building their next-generation Resume Builder in Flex 4.5 as well as [...]]]></description>
			<content:encoded><![CDATA[<p>I was notified on Friday that the entire web development team at my company, Pongo Resume, will be laid off at the end of this month. I&#8217;ve been a full-time web developer for 8 years. The majority of my time at Pongo was spent building their next-generation Resume Builder in Flex 4.5 as well as maintaining their legacy Resume Builder in Flash (AS2). I also spent a significant amount of time in ColdFusion 9 rewriting their billing process.</p>
<p>Before working at Pongo, I worked for 13 years at Hasbro where a significant amount of my time was spent building out their media portals using ColdFusion and Flash. The portals allowed viewing of videos, playing games, and reading online comic books. I also spent a good deal of time working with my friend and fellow blogger <a href="http://www.danielgaspar.com/blog/" target="_blank">Dan Gaspar</a> creating a ColdFusion/Model Glue API which provided access to our data to facilitate both internal and external development.</p>
<p>While my main focus has been within the Adobe stack; Flash, Flex, and ColdFusion, I also have experience in PHP, JQuery, JavaScript, and several other web technologies. I have worked with frameworks and I&#8217;m familiar with MVC concepts.</p>
<p>If you know of anyone in the Massachusetts or Rhode Island area that is looking for a developer please contact me or feel free to pass along my information. In addition to myself, there will be three other hard-working developers looking for work.</p>
<p>Thanks much!<br />
Glenn Gervais</p>
<p><a rel="attachment wp-att-555" href="http://rabidgadfly.com/2011/10/seeking-flex-flash-coldfusion-job-massachusetts/d260b146-b3ab-4aa8-bb5c-71bb48d26928/"><img class="size-full wp-image-555 alignleft" title="d260b146-b3ab-4aa8-bb5c-71bb48d26928" src="http://rabidgadfly.com/wp-content/uploads/2011/10/d260b146-b3ab-4aa8-bb5c-71bb48d26928.png" alt="contact me" width="262" height="41" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2011/10/seeking-flex-flash-coldfusion-job-massachusetts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flex Optimization Tip: Evaluate Your Setter Parameter</title>
		<link>http://rabidgadfly.com/2011/03/flex-optimization-tip-evaluate-your-setter-parameter/</link>
		<comments>http://rabidgadfly.com/2011/03/flex-optimization-tip-evaluate-your-setter-parameter/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 18:37:39 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[flash builder]]></category>
		<category><![CDATA[getter]]></category>
		<category><![CDATA[setter]]></category>

		<guid isPermaLink="false">http://rabidgadfly.com/?p=529</guid>
		<description><![CDATA[Flash Builder makes it easy to generate getters and setters from a variable definition. Just select the variable, right-click and choose Source > Generate getters/setters. The generated code is simple; the getter returns the value and the setter sets the value: Oftentimes in Flex, however, changing a variable is a trigger that causes other code [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rabidgadfly.com/2011/03/flex-optimization-tip-evaluate-your-setter-parameter/fb5/" rel="attachment wp-att-534"><img src="http://rabidgadfly.com/wp-content/uploads/2011/03/fb5.png" alt="" title="fb5" width="150" height="150" class="alignright size-full wp-image-534" /></a>Flash Builder makes it easy to generate getters and setters from a variable definition. Just select the variable, right-click and choose Source > Generate getters/setters.</p>
<p>The generated code is simple; the getter returns the value and the setter sets the value:</p>
<pre class="brush: as3; title: ; notranslate">
private var _myData:String;

public function get myData():String {
    return _myData;
}

public function set myData(value:String):void {
   _myData = value;
}
</pre>
<p>Oftentimes in Flex, however, changing a variable is a trigger that causes other code to run or update. But  why would you want this extra processing to occur if the value that is being assigned hasn&#8217;t changed?<br />
<span id="more-529"></span><br />
Instead, add a quick comparison:</p>
<pre class="brush: as3; title: ; notranslate">
public function set myData(value:String):void {
    if(_myData != value) {
       _myData = value;
    }
}
</pre>
<p>Note that you would use ObjectUtil.compare rather than equality to compare complex Objects: </p>
<pre class="brush: as3; title: ; notranslate">
public function set myObjectData(value:Object):void {
    if(ObjectUtil.compare(_myObjectData,value) != 0 ) {
       _myObjectData = value;
    }
}
</pre>
<p>Obviously, depending on the complexity and size of the objects, and the amount of work to be done after an update, comparing Objects may not make sense in all circumstances. That&#8217;s a judgement call you can make based on your particular code.</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2011/03/flex-optimization-tip-evaluate-your-setter-parameter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Swiz &#8216;Could not get a reference to class&#8217; Gotcha</title>
		<link>http://rabidgadfly.com/2011/02/swiz-could-not-get-a-reference-to-class-gotcha/</link>
		<comments>http://rabidgadfly.com/2011/02/swiz-could-not-get-a-reference-to-class-gotcha/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 14:56:03 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[swiz]]></category>

		<guid isPermaLink="false">http://rabidgadfly.com/?p=500</guid>
		<description><![CDATA[I&#8217;ve been implementing Swiz framework in my most recent Flex project. It&#8217;s worked great so far, but this one error sidetracked me for an hour or so: "Could not get a reference to class for YourEvent.YOUR_EVENT_TYPE. Did you specify its package in SwizConfig::eventPackages?" Obviously, the first thing to do when receiving this message is to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rabidgadfly.com/2011/02/swiz-could-not-get-a-reference-to-class-gotcha/projectavatar/" rel="attachment wp-att-501"><img src="http://rabidgadfly.com/wp-content/uploads/2011/02/projectavatar.png" alt="" title="projectavatar" width="75" height="75" class="alignright size-full wp-image-501" /></a>I&#8217;ve been implementing <a href="http://swizframework.org/">Swiz framework</a> in my most recent <a href="http://www.adobe.com/products/flex/">Flex</a> project. It&#8217;s worked great so far, but this one error sidetracked me for an hour or so:</p>
<p><code>"Could not get a reference to class for <em>YourEvent.YOUR_EVENT_TYPE</em>. Did you specify its package in SwizConfig::eventPackages?"</code></p>
<p><span id="more-500"></span><br />
Obviously, the first thing to do when receiving this message is to make sure you specified the event package in SwizConfig::eventPackages. Once that&#8217;s confirmed, you ensure that the event has been imported, then try cleaning your project(s). </p>
<p>At this point it starts getting frustrating and you could easily start going off the rails moving code around and making crazy modifications. Before you get to that point, make sure you&#8217;re actually dispatching the event somewhere in your code. If you aren&#8217;t, then the event isn&#8217;t included when the application is compiled. Since it never gets included, Swiz cannot get a reference to it when the application runs.</p>
<p>This can happen when refactoring and moving events around a little at a time. If you&#8217;re like me, you do a little testing along the way to make sure everything continues to work properly. That&#8217;s when you can wind up in a case where you may be listening for an event that you haven&#8217;t yet written the dispatch code for.</p>
<p>It may seems like an occurrence that may happen once in a blue moon (Mmmm&#8230;<a href="http://www.bluemoonbrewingcompany.com/">Blue Moon</a>), but it&#8217;s already happened to me twice in the span of a couple of weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2011/02/swiz-could-not-get-a-reference-to-class-gotcha/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ColdFusion Mappings and Hibernate</title>
		<link>http://rabidgadfly.com/2011/02/coldfusion-mappings-and-hibernate/</link>
		<comments>http://rabidgadfly.com/2011/02/coldfusion-mappings-and-hibernate/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 03:20:38 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[coldFusion]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[orm]]></category>

		<guid isPermaLink="false">http://rabidgadfly.com/?p=489</guid>
		<description><![CDATA[Here’s a quick tip on an issue that set me back a couple of hours. ORM stands for Object/Relational Mapping, an object-based method of reducing the amount of code required to communicate with a database. Hibernate is an ORM Framework included in ColdFusion 9. I’m new to ORM so I started out by creating a [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-490" href="http://rabidgadfly.com/2011/02/coldfusion-mappings-and-hibernate/hibernate/"><img class="alignright size-thumbnail wp-image-490" title="hibernate" src="http://rabidgadfly.com/wp-content/uploads/2011/02/hibernate-150x150.jpg" alt="" width="150" height="150" /></a>Here’s a quick tip on an issue that set me back a couple of hours. ORM stands for Object/Relational Mapping, an object-based method of reducing the amount of code required to communicate with a database. Hibernate is an ORM Framework included in ColdFusion 9.</p>
<p>I’m new to ORM so I started out by creating a simple project with all components contained under the same application. It was a small struggle to get past the new terminology and occasional mistakes and/or omissions in the online documentation, but a few hours and several expletives later, I was up and running.</p>
<p><span id="more-489"></span><br />
My next step was to apply the method to an existing site. The major difference being that I wanted my ORM object definitions to be inaccessible externally. This required creating a ColdFusion mapping, which I created using the CF Administrator.</p>
<p>I set everything up and ran a test page which replied with an error: “Hibernate mapping for … component not found.”</p>
<p>After several hours of Googling, combined with a lot of trial and error, I discovered that in order to use Hibernate with a CF mapping, the mapping must application level. Once I deleted my mapping from CF Admin and added it to my Application.CFC, the error stopped and my results appeared.</p>
<p>One other note to keep in mind when configuring your ColdFusion application to use Hibernate: ORM settings must go in Application.CFC instead of the old-school Application.cfm.</p>
<p>-rG</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2011/02/coldfusion-mappings-and-hibernate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unusual Flex Problem? Check Your Metadata!</title>
		<link>http://rabidgadfly.com/2011/02/unusual-flex-problem-check-your-metadata/</link>
		<comments>http://rabidgadfly.com/2011/02/unusual-flex-problem-check-your-metadata/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 18:46:31 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash builder]]></category>
		<category><![CDATA[metadata]]></category>

		<guid isPermaLink="false">http://rabidgadfly.com/?p=469</guid>
		<description><![CDATA[I&#8217;ve been working with Flash Builder 4 every day for about six months now, and I love it. Overall, Flash Builder is a great programming environment offering helpful debugging tools, plenty of useful keyboard shortcuts, code-hinting and completion, and error feedback on compilation issues. The compilation errors can be SO helpful that you rely on [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-476" href="http://rabidgadfly.com/2011/02/unusual-flex-problem-check-your-metadata/angry_2x2/"><img class="alignright size-full wp-image-476" title="Stressed" src="http://rabidgadfly.com/wp-content/uploads/2011/02/angry_2x2.jpg" alt="" width="200" height="200" /></a>I&#8217;ve been working with Flash Builder 4 every day for about six months now, and I love it. Overall, Flash Builder is a great programming environment offering helpful debugging tools, plenty of useful keyboard shortcuts, code-hinting and completion, and error feedback on compilation issues.</p>
<p>The compilation errors can be SO helpful that you rely on them as guides. When refactoring code the errors tell you where you need to go to fix affected code. And if you use metadata correctly, the errors can tell you when you&#8217;ve forgotten to include a required component.</p>
<p>As helpful as the metadata, code-hinting and error-checking is, it&#8217;s not quite perfect; and it&#8217;s these little imperfections that can set you off on an afternoon-long detour. Reason being, while metadata can help enforce rules and enhance code-hinting, and while error-checking can point out problems with your code, metadata itself is not error-checked.</p>
<p>Enter my problem&#8230;</p>
<p><span id="more-469"></span>I added a skin state and skin parts to an existing component and couldn&#8217;t for the life of me figure out why the component class would not update the content of the text fields I had placed in the skin. I&#8217;d done this several times before but this time it just wouldn&#8217;t work.</p>
<p>I made sure I had defined the skin parts in my component, I traced and debugged for several hours, I googled  and traversed several blogs, I read through the Adobe online help reading in-depth descriptions of getCurrentSkinState, invalidateSkinState, and attachSkin.</p>
<p>Finally, it dawned on me. I scrolled once again up to the section of my component where I defined the skin parts and looked closely at the meta data definition. Sure enough, there was the problem.  I had type &#8220;Skinpart&#8221; instead of &#8220;SkinPart&#8221;. I forgot to capitalize the P. No warnings, no errors; just a bunch of text fields in the skin and variables in the component that were acting appropriately on their own, but were not connected in any way.</p>
<p>It took about a half hour to remove all of the ridiculous code I had added to try to compensate for that lowercase p. In the end, I walk away with a better knowledge of Flex skins, and hopefully an ability to recognize that issue sooner in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2011/02/unusual-flex-problem-check-your-metadata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back up soon</title>
		<link>http://rabidgadfly.com/2011/01/back-up-soon/</link>
		<comments>http://rabidgadfly.com/2011/01/back-up-soon/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 14:34:53 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rabidgadfly.com/?p=5</guid>
		<description><![CDATA[Thanks for visiting the site. Unfortunately, the jackass that owned the server my site was hosted on decided to take it down without telling me. Luckily, I have a good portion of it backed up locally because I knew he was a jackass. I hope to be back up and running soon. Sorry for the [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks for visiting the site. Unfortunately, the jackass that owned the server my site was hosted on decided to take it down without telling me. Luckily, I have a good portion of it backed up locally because I knew he was a jackass. I hope to be back up and running soon. Sorry for the inconvenience.</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2011/01/back-up-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create Flex Arrow Buttons Using Spark Path</title>
		<link>http://rabidgadfly.com/2010/11/create-flex-arrow-buttons-using-spark-path/</link>
		<comments>http://rabidgadfly.com/2010/11/create-flex-arrow-buttons-using-spark-path/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 02:33:40 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.rabidgadfly.com/?p=449</guid>
		<description><![CDATA[Path is a Flex 4 drawing class that fills a shape using coordinates you provide. It&#8217;s very simple once you get the hang of it, and if you add some filters you can come up with a pretty nice looking image. In this post I&#8217;m going to show you a quick overview of how to [...]]]></description>
			<content:encoded><![CDATA[<p>Path is a Flex 4 drawing class that fills a shape using coordinates you provide. It&#8217;s very simple once you get the hang of it, and if you add some filters you can come up with a pretty nice looking image. In this post I&#8217;m going to show you a quick overview of how to draw a custom arrow using Path that can be used as a button as seen in this sample:</p>
<div width="100%" style="text-align:center;">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_pathButtons_528883743"
			class="flashmovie"
			width="200"
			height="150">
	<param name="movie" value="http://www.rabidgadfly.com/swf/pathButtons/pathButtons.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.rabidgadfly.com/swf/pathButtons/pathButtons.swf"
			name="fm_pathButtons_528883743"
			width="200"
			height="150">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><span id="more-449"></span><br />
You can right-click the sample to view or download the source.</p>
<p>After creating a new Flex 4 Web Application project, I create a new MXML skin named NextButtonSkin based on spark.components.Button. While my button will use the states and functionality of a Spark button, it will use none of the look so I delete most of the default Button MXML. ( If you want more detail on button skinning you can take a look at my <a href="http://www.rabidgadfly.com/index.php/2010/09/30/easily-create-image-buttons-flex-4/">Create Your Own Image Buttons</a> post. ) The remaining button skin code looks like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;

&lt;s:SparkSkin xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
			 xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
			 xmlns:fb=&quot;http://ns.adobe.com/flashbuilder/2009&quot;
			 minWidth=&quot;48&quot; minHeight=&quot;48&quot;
			 alpha.disabled=&quot;0.5&quot;&gt;

	&lt;!-- host component --&gt;
	&lt;fx:Metadata&gt;
		&lt;![CDATA[
		/* @copy spark.skins.spark.ApplicationSkin#hostComponent 	*/
		[HostComponent(&quot;spark.components.Button&quot;)]
		]]&gt;
	&lt;/fx:Metadata&gt;

	&lt;!-- states --&gt;
	&lt;s:states&gt;
		&lt;s:State name=&quot;up&quot; /&gt;
		&lt;s:State name=&quot;over&quot; /&gt;
		&lt;s:State name=&quot;down&quot; /&gt;
		&lt;s:State name=&quot;disabled&quot; /&gt;
	&lt;/s:states&gt;

	&lt;!--- Your arrow will start after this line ---&gt;

	&lt;!---- Your arrow will end above this line -----&gt;

&lt;/s:SparkSkin&gt;
</pre>
<p>Notice that the code above doesn&#8217;t even contain a button because I&#8217;m going to create my own graphic to use as a button. To start, I add a Graphic containing a Path and a fill. I don&#8217;t draw my arrow first because, without a fill, I won&#8217;t be able to see the arrow I&#8217;m going to draw. At this point my Graphic code looks like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--- Your arrow will start after this line ---&gt;

&lt;s:Graphic&gt;
	&lt;s:Path data=&quot;&quot;&gt;
		&lt;s:fill&gt;
			&lt;s:LinearGradient rotation=&quot;90&quot;&gt;
				&lt;s:GradientEntry color=&quot;0xfd1901&quot; color.down=&quot;0xAF220D&quot; /&gt;
				&lt;s:GradientEntry color=&quot;0xa70d12&quot; color.down=&quot;0xAF220D&quot; /&gt;
			&lt;/s:LinearGradient&gt;
		&lt;/s:fill&gt;
	&lt;/s:Path&gt;
&lt;/s:Graphic&gt;

&lt;!---- Your arrow will end above this line -----&gt;
</pre>
<p>Now I can begin drawing my arrow. When creating a path, picture your image on grid paper. The lines you draw will run along the grid lines and the fill will color in the middle for you, something like this:</p>
<div width="100%" style="text-align:center;">
<a href="http://www.rabidgadfly.com/wp-content/uploads/arrow.jpg"><img class="aligncenter size-full wp-image-462" title="arrow on grid" src="http://www.rabidgadfly.com/wp-content/uploads/arrow.jpg" alt="" width="282" height="251" /></a>
</div>
<p>The arrow is defined inside the data property of the Graphic and each segment includes a segment type and x/y coordinates relative to the end point of the previous segment. I&#8217;m only going to use a few of the possible segment types, but if you want to see the full list you can check them out <a href="http://docs.huihoo.com/flex/4/spark/primitives/Path.html">here</a>.</p>
<p>Since I don&#8217;t have an end point when I start off, the first command I put in there, &#8220;m 5 20&#8243;, will tell the application that the segment I&#8217;m drawing will start 5 pixels in and 20 pixels down from the top of the Graphic area. If I were drawing the arrow on paper this would mean I was putting my pencil to paper 5 grid squares in and 20 down.</p>
<p>From there I want to draw a horizontal line 15 pixels long and extending to the right of my starting point. &#8220;h 15&#8243; accomplishes the task. If I wanted the line to extend to the left, I would enter &#8220;h -15&#8243;. From that point I want to draw a line, slightly diagonal, that will be the beginning of the arrow head. There&#8217;s no &#8220;d&#8221; for diagonal, so I have to tell it to draw a line to a certain point. In this case, I enter &#8220;l -3 -8&#8243; which draws a line from the end point of my horizontal line and extending 3 pixels to the left and 8 pixel up. Get the idea?</p>
<p>The finished arrow code looks like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--- Your arrow will start after this line ---&gt;

&lt;s:Graphic&gt;
	&lt;s:Path data=&quot;m 5 20
			h 15
			l -3 -8
			l 18 14
			l -18 14
			l 3 -8
			h -18
			v -12&quot;&gt;
		&lt;s:fill&gt;
			&lt;s:LinearGradient rotation=&quot;90&quot;&gt;
				&lt;s:GradientEntry color=&quot;0xfd1901&quot; color.down=&quot;0xAF220D&quot; /&gt;
				&lt;s:GradientEntry color=&quot;0xa70d12&quot; color.down=&quot;0xAF220D&quot; /&gt;
			&lt;/s:LinearGradient&gt;
		&lt;/s:fill&gt;
		&lt;s:stroke&gt;
			&lt;s:SolidColorStroke color=&quot;0xAF220D&quot; weight=&quot;1&quot; alpha=&quot;.8&quot; alpha.disabled=&quot;0&quot;  alpha.up=&quot;0&quot;/&gt;
		&lt;/s:stroke&gt;
	&lt;/s:Path&gt;
&lt;/s:Graphic&gt;

&lt;!---- Your arrow will end above this line -----&gt;
</pre>
<p>That&#8217;s it! My &#8220;Next&#8221; arrow is done. I follow the same process for the Previous button. Then, I add them to my default page, which ends up looking like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
			   xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
			   xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot; minWidth=&quot;955&quot; minHeight=&quot;600&quot;&gt;

	&lt;s:Button skinClass=&quot;PrevButtonSkin&quot; buttonMode=&quot;true&quot; left=&quot;25&quot; top=&quot;25&quot; /&gt;
	&lt;s:Button skinClass=&quot;NextButtonSkin&quot; buttonMode=&quot;true&quot; left=&quot;100&quot; top=&quot;25&quot; /&gt;

&lt;/s:Application&gt;
 </pre>
<p>The skinClass attribute of the Buttons contains the name of the MXML skin files where I drew the buttons. That&#8217;s all there is to it.</p>
<p>To view or download the complete source, right-click on the app at the top of this post and click &#8220;View Source&#8221;.</p>
<p>-rG</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2010/11/create-flex-arrow-buttons-using-spark-path/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create Your Own Image Buttons In Flex 4</title>
		<link>http://rabidgadfly.com/2010/09/easily-create-image-buttons-flex-4/</link>
		<comments>http://rabidgadfly.com/2010/09/easily-create-image-buttons-flex-4/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 13:34:51 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[flex 4]]></category>

		<guid isPermaLink="false">http://www.rabidgadfly.com/?p=403</guid>
		<description><![CDATA[Flex doesn't offer an image button, but let's say you need one for an application that requires a question mark help button. This short tutorial will walk you through the steps to create it.]]></description>
			<content:encoded><![CDATA[<p>The more I use Flex the more I love its extensibility. Being able to extend, view, or copy the native Flex code makes my job so much easier. Here&#8217;s a short tutorial demonstrating how it can help. I promise there isn&#8217;t much typing involved, but if you just want to skip to the coding and view the final source you can do so by right-clicking the finished help button at the bottom of the post and clicking &#8220;View Source&#8221;.</p>
<p>Flex doesn&#8217;t offer an image button, but let&#8217;s say you need one for an application that requires a question mark help button. Here&#8217;s one way to do it:</p>
<p><span id="more-403"></span></p>
<p><span style="color: #993300;"><em><strong>Quick Note:</strong> The following tutorial assumes that you&#8217;re using Flash Builder 4. If you&#8217;re using another coding environment, the code will remain the same but you may have to modify some of the specified shortcuts or menu options.</em></span></p>
<p>First, create a new project named ImageButtonExample.</p>
<p>Next, create an &#8220;images&#8221; folder under &#8220;src&#8221;.</p>
<p>You&#8217;re going to need some help button images so you can create your own or you can use these:</p>
<table border="0">
<tbody>
<tr>
<td><a href="http://www.rabidgadfly.com/wp-content/uploads/helpnormal.png"><img style="border: 0;" src="http://www.rabidgadfly.com/wp-content/uploads/helpnormal.png" alt="" width="48" height="48" /></a></td>
<td><a href="http://www.rabidgadfly.com/wp-content/uploads/helpover.png"><img style="border: 0;" src="http://www.rabidgadfly.com/wp-content/uploads/helpover.png" alt="" width="48" height="48" /></a></td>
<td><a href="http://www.rabidgadfly.com/wp-content/uploads/helpdown.png"><img style="border: 0pt none;" src="http://www.rabidgadfly.com/wp-content/uploads/helpdown.png" alt="" width="48" height="48" /></a></td>
</tr>
</tbody>
</table>
<p>The three buttons are for three button states: up, over, and down. Save them into the &#8220;images&#8221; folder you just created as helpnormal.png, helpover.png and helpdown.png.  Make sure you refresh your images folder after saving the images into it so your images are recognized by the application. If you forget this step you will receive errors indicating that Flex can&#8217;t find the files.</p>
<p>Next, create a new package named myClasses where you can store the classes you create (best practice is to store your classes in their own package).<span style="color: #3366ff;"><em> [ Right-click "src" and then select New &gt; Package then enter myClasses in the Name field and click Finish ]</em></span>.</p>
<p>Now create a new ActionScript Class in the myClasses package. Call your new Class ImageButton and tell it to use spark.components.Button as its Superclass. <em><span style="color: #3366ff;">[ Right-click myClasses then select New &gt; ActionScript Class. Enter ImageButton in the Name field and spark.components.Button in the Superclass field then click Finish ]</span></em>.</p>
<p>What you end up with should look like this:</p>
<pre class="brush: as3; title: ; notranslate">
package myClasses
{
	import spark.components.Button;

	public class ImageButton extends Button
	{
		public function ImageButton()
		{
			super();
		}
	}
}
</pre>
<p>For the most part, the Spark Button handles almost everything your button needs. I&#8217;ll come back to the need for extending a little later.</p>
<p>For now create a new package named mySkins by following the same procedure you used to create myClasses above.</p>
<p>Create a new Skin for your Button in mySkins named HelpButtonSkin using ImageButton as its Host Component. <em><span style="color: #3366ff;">[ Right-click mySkins then select New &gt; MXML Skin. Enter HelpButtonSkin in the Name field and myClasses.ImageButton in the Host Component field then click Finish ]</span></em>.</p>
<p>What you&#8217;ve been given there in your new Skin is the skin tothe Flex Spark Button. This can be very handy if you just want to make a few small changes. For this project, however, you&#8217;ll be using very little of that code. So, instead of telling you everything you need to remove, I&#8217;m just going to give you the end result:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;

&lt;s:SparkSkin xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
			 xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
			 xmlns:fb=&quot;http://ns.adobe.com/flashbuilder/2009&quot;
			 minWidth=&quot;48&quot; minHeight=&quot;48&quot;
			 alpha.disabled=&quot;0.5&quot;&gt;

	&lt;!-- host component --&gt;
	&lt;fx:Metadata&gt;
		&lt;![CDATA[
		/* @copy spark.skins.spark.ApplicationSkin#hostComponent 	*/
		[HostComponent(&quot;myClasses.ImageButton&quot;)]
		]]&gt;
	&lt;/fx:Metadata&gt;

	&lt;!-- states --&gt;
	&lt;s:states&gt;
		&lt;s:State name=&quot;up&quot; /&gt;
		&lt;s:State name=&quot;over&quot; /&gt;
		&lt;s:State name=&quot;down&quot; /&gt;
		&lt;s:State name=&quot;disabled&quot; /&gt;
	&lt;/s:states&gt;

	&lt;s:Rect left=&quot;0&quot; right=&quot;0&quot; top=&quot;0&quot; bottom=&quot;0&quot; &gt;
		&lt;s:fill&gt;
			&lt;s:SolidColor color=&quot;0xffffff&quot; alpha=&quot;1&quot; /&gt;
		&lt;/s:fill&gt;
	&lt;/s:Rect&gt;

	&lt;s:BitmapImage source=&quot;@Embed('images/helpnormal.png')&quot; includeIn=&quot;up, disabled&quot;/&gt;
	&lt;s:BitmapImage source=&quot;@Embed('images/helpover.png')&quot; includeIn=&quot;over&quot;/&gt;
	&lt;s:BitmapImage source=&quot;@Embed('images/helpdown.png')&quot; includeIn=&quot;down&quot;/&gt;

&lt;/s:SparkSkin&gt;
</pre>
<p>Basically, you&#8217;re replacing everything between the closing states tag and the closing SparkSkin tag with a Rectangle and three BitmapImages. What you&#8217;re doing is creating a hit area for the button by defining a rectangle with an alpha of .1 . This will not be visible but will register when someone rolls over its area. This will allow for some margin of error around your button.</p>
<p>Next, you&#8217;re embedding the three help button images in the skin. They won&#8217;t all appear at the same time because you&#8217;ve told them in which states they should appear by using the includeIn property. The possible states you can used are defined just above the added code. They were put there automatically by Flex because you based the Skin on a Button.</p>
<p>Now open the application mxml file that was created automatically when you created the project. It&#8217;s probably under (default package) and it&#8217;s probably named ImageButtonExample.mxml . Just above the closing Application tag, insert your ImageButton component using &#8220;mySkins.HelpButtonSkin&#8221; as its SkinClass. <em><span style="color: #3366ff;">[ Enter  an opening tag ("&lt;") and begin typing "ImageButton". A dropdown should appear while you're type and it should contain myClasses:ImageButton. DoubleClick it. That will not only complete the component name for you, it will also add myClasses as a namespace in the opening Application tag. After ImageButton enter skinClass="mySkins.HelpButtonSkin" and then close the tag. ]</span></em></p>
<p>Your application file should look like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
			   xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
			   xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;
			   xmlns:myClasses=&quot;myClasses.*&quot;
			   minWidth=&quot;955&quot; minHeight=&quot;600&quot; &gt;

	&lt;myClasses:ImageButton skinClass=&quot;mySkins.HelpButtonSkin&quot;  /&gt;

&lt;/s:Application&gt;
</pre>
<p>Now, save all files and run your application. You should see the normal help image in the upper left corner of your browser. If you hover over it and click it, it will change images to the appropriate state image. Pretty slick!</p>
<p>The one thing that&#8217;s lacking at this point is the hand cursor. By default, when you roll over a Spark Button the arrow remains. Luckily, we&#8217;ve already extended the button so we can quickly add that last bit of functionality!</p>
<p>Open ImageButton.as and just below the &#8220;super()&#8221; line add a new line that says &#8220;this.buttonMode=true;&#8221; so that your class now looks like this:</p>
<pre class="brush: as3; title: ; notranslate">
package myClasses
{
	import spark.components.Button;

	public class ImageButton extends Button
	{
		public function ImageButton()
		{
			super();
			this.buttonMode = true;
		}
	}
}
</pre>
<p>Now run your application again and mouse over your button.</p>
<p>Presto, a hand cursor! You&#8217;ve now created your own image button that you can easily reuse or enhance. Great job!</p>
<p>To view the source , right-click on the finished help button below and then click &#8220;View Source&#8221;:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_ImageButtonExample_518704008"
			class="flashmovie"
			width="50"
			height="50">
	<param name="movie" value="http://www.rabidgadfly.com/swf/imagebuttons/ImageButtonExample.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.rabidgadfly.com/swf/imagebuttons/ImageButtonExample.swf"
			name="fm_ImageButtonExample_518704008"
			width="50"
			height="50">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>-rG</p>
<p><strong>Update:</strong> Creating the ImageButton class is not a necessity, but I think it makes a good example of how to extend a class and modify it for your own purposes. In this particular case, you could use the Spark Button instead of ImageButton in ImageButtonExample.mxml. To get the hand cursor to show up you can specify buttonMode=&#8221;true&#8221; as a property in the tag, like this: &lt;s:Button buttonMode=&#8221;true&#8221; skinClass=&#8221;mySkins.HelpButtonSkin&#8221; /&gt;.</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2010/09/easily-create-image-buttons-flex-4/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>ColdFusion Position Available &#8211; Northborough, MA</title>
		<link>http://rabidgadfly.com/2010/09/coldfusion-position-available-northborough-ma/</link>
		<comments>http://rabidgadfly.com/2010/09/coldfusion-position-available-northborough-ma/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 13:12:22 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[coldFusion]]></category>
		<category><![CDATA[job posting]]></category>

		<guid isPermaLink="false">http://www.rabidgadfly.com/?p=391</guid>
		<description><![CDATA[Pongo Resume in Northborough, MA is seeking a ColdFusion developer. Very casual working environment. Free caffeine all day long in the form of coffee, soda, or juice. Free lunches every Friday. If you&#8217;re interested send an e-mail to jobs-DEV@pongoresume.com and tell them you heard about it on this blog. Full description: Company: Pongo Resume Position [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.pongoresume.com">Pongo Resume</a> in <a href="http://maps.google.com/maps?f=q&#038;source=s_q&#038;hl=en&#038;geocode=&#038;q=44+Bearfoot+Rd,+Northborough,+MA+01532&#038;sll=37.0625,-95.677068&#038;sspn=48.019527,79.013672&#038;ie=UTF8&#038;hq=&#038;hnear=44+Bearfoot+Rd,+Northborough,+Worcester,+Massachusetts+01532&#038;t=h&#038;z=16">Northborough, MA</a> is seeking a ColdFusion developer. Very casual working environment. Free caffeine all day long in the form of coffee, soda, or juice. Free lunches every Friday. If you&#8217;re interested send an e-mail to jobs-DEV@pongoresume.com and tell them you heard about it on this blog.</p>
<p>Full description:</p>
<p><span style="color:#666633;font-weight:bold">Company:</span> Pongo Resume</p>
<p><span style="color:#666633;font-weight:bold">Position Title:</span> Development Specialist</p>
<p><span style="color:#666633;font-weight:bold">Type:</span> Full Time</p>
<p><span style="color:#666633;font-weight:bold">Overview:</span><br />
Pongo Resume is a premier, full-service online resource for job seekers. Privately held and headquartered in Northborough, Massachusetts, Pongo was honored in 2009 as one of the Inc. 5000 fastest growing private U.S. companies. Pongo Resume has more than 5 million registered users and averages well over a half-million unique visitors per month. The Pongo Resume web site provides users with all the tools, templates, and support needed to write professional resumes and cover letters, ace tough interviews, and secure a great job. Our users generate over 100,000 resumes per month.</p>
<p><span style="color:#666633;font-weight:bold">Responsibilities: </span><br />
We are seeking a bright, hard working, and self-motivated, mid to senior level Web Application Developer utilizing web technologies such as Flex, ColdFusion, jQuery and XML.  You will work closely with all members of the Pongo team.</p>
<p>•	Build and maintain highly scalable and dynamic web applications utilizing Flex, ColdFusion, jQuery and SQL Server.<br />
•	Develop reusable code and interaction with business logic database.<br />
•	Support and maintain existing application functionality through version releases and bug fixes.<br />
•	Adhere to rigid coding standards and best practices when developing applications.<br />
•	Brainstorm solutions and execute details to deliver end to end solutions.</p>
<p><span style="color:#666633;font-weight:bold">Minimum Qualifications:</span><br />
•	Proven experience developing dynamic applications that blend interactive GUIs developed in Flex, ColdFusion and jQuery with SQL Server databases.<br />
•	Solid understanding of object-oriented programming techniques.<br />
•	Experience with object-oriented and services-oriented architectures and methodologies.<br />
•	Experience with Flex and ColdFusion frameworks such as Mach II, Fusebox, Coldbox and Mate, a plus.<br />
•	Experience with Content Management Systems, such as Mura, a plus.<br />
•	Must be detailed-oriented and possess a strong drive to deliver quality, consistent results in a timely manner.<br />
•	Ability to handle multiple projects simultaneously.</p>
<p><span style="color:#666633;font-weight:bold">Contact: </span></p>
<p>Please send cover letter, resume, and salary requirements to:</p>
<p>jobs-DEV@pongoresume.com</p>
<p>Pongo Resume provides a friendly and collaborative working environment which encourages personal and professional growth.</p>
<p>Benefits include medical (HMO), dental, long -and short-term disability, free lunch Fridays, 401K, 15 PTO days, 10 paid holidays, closed between Christmas and New Year&#8217;s with pay.</p>
<p style="font-weight:bold;padding-top:25px;padding-bottom:25px;">Good Luck!<br/><br/>Glenn</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2010/09/coldfusion-position-available-northborough-ma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Style Items in a Flex 4 Spark List</title>
		<link>http://rabidgadfly.com/2010/09/styling-items-in-flex-4-list/</link>
		<comments>http://rabidgadfly.com/2010/09/styling-items-in-flex-4-list/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 16:38:25 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[flex 4]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[spark]]></category>

		<guid isPermaLink="false">http://www.rabidgadfly.com/?p=374</guid>
		<description><![CDATA[I&#8217;ve often heard it said that while Flex has a knack for making difficult tasks easy, it also has the same knack for making seemingly easy tasks difficult. While I agree that on occasion it seems that way up front, I usually find that the solution isn&#8217;t usually difficult, just difficult to find. That was [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve often heard it said that while Flex has a knack for making difficult tasks easy, it also has the same knack for making seemingly easy tasks difficult. While I agree that on occasion it seems that way up front, I usually find that the solution isn&#8217;t usually difficult, just difficult to find.</p>
<p>That was the case I found when recently working with the Spark List Component. Dynamically assigning an ArrayList as a Spark List&#8217;s data provider was a quick task and everything worked as expected. I was thrilled. Now I just had to tweak the spacing between the list items and I&#8217;d be finished. Easy, right? Ultimately the answer is yes. However, arriving at the solution took me a couple of hours!</p>
<p>The Spark List component automatically adds cool rollover and select effects. It also allows you to change rollover colors, set the width, and adjust the font size with simple attributes. What it <em>doesn&#8217;t</em> let you do so easily is set the spacing between list items. <em>( Note that I&#8217;m referring to a dynamically populated List, not one in which you define each item individually where you have the luxury of modifying the attributes of each item )</em>.</p>
<p>Here&#8217;s some code to demonstrate the situation:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
	xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
	xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;
	preinitialize=&quot;preinitHandler(event)&quot;  &gt;
	&lt;fx:Script&gt;
		&lt;![CDATA[
		import mx.collections.ArrayList;
		import mx.events.FlexEvent;

		[Bindable]
		private var monthsList:ArrayList;

		protected function preinitHandler(event:FlexEvent):void {
			monthsList = new ArrayList([&quot;January&quot;, &quot;February&quot;, &quot;March&quot;, &quot;April&quot;, &quot;May&quot;, &quot;June&quot;, &quot;July&quot;, &quot;August&quot;, &quot;September&quot;, &quot;October&quot;, &quot;November&quot;,&quot;December&quot;]);
		}
		]]&gt;
	&lt;/fx:Script&gt;

	&lt;s:List id=&quot;months&quot; dataProvider=&quot;{monthsList}&quot; /&gt;
&lt;/s:Application&gt;
</pre>
<p>The code above populates a Spark List with months. Very quick and easy! But now I want to close up the space between the months. Simple padding or gap attribute on the list, right? Nope. lineheight? No. Custom VerticalLayout? Uh uh. Google? Majority of results show examples where each item is defined manually&#8230;that doesn&#8217;t help either.</p>
<p>The answer it turns out is to define a custom ItemRenderer. This is used to tell the results how they should render when displayed. Common sense, right? And it&#8217;s pretty easy to do too:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:List id=&quot;months&quot; dataProvider=&quot;{monthsList}&quot; &gt;
	&lt;s:itemRenderer&gt;
		&lt;fx:Component&gt;
			&lt;s:ItemRenderer&gt;
				&lt;s:Label text=&quot;{data}&quot; paddingTop=&quot;3&quot; paddingBottom=&quot;3&quot; fontSize=&quot;11&quot; /&gt;
			&lt;/s:ItemRenderer&gt;
		&lt;/fx:Component&gt;
	&lt;/s:itemRenderer&gt;
&lt;/s:List&gt;
</pre>
<p>You can style the output any way you like by styling the label in the ItemRenderer. Note that if your data source contains multiple &#8220;fields&#8221; with property names, you&#8217;ll need to tweak the label text value slightly to reflect the property name of the value you&#8217;ll be displaying. So, instead of {data}, you would use something like {data.propertyName}.</p>
<p><strong>Bonus tip:</strong> For reusability and flexibility you can define the the ItemRenderer as a separate MXML file and assign it to the itemRenderer property of the Spark List. Even better, you can add the Label style to a style sheet and use it throughout your application.</p>
<p>-rG</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2010/09/styling-items-in-flex-4-list/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

