<?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>Flexpert to the rescue &#187; Flash Builder</title>
	<atom:link href="http://www.flexpert.be/category/flash-builder/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexpert.be</link>
	<description>Blog site about all things Adobe</description>
	<lastBuildDate>Sat, 28 Aug 2010 17:07:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Sneak-peak to my session at Adobe MAX 2010</title>
		<link>http://www.flexpert.be/2010/08/sneak-peak-to-my-session-at-adobe-max-2010/</link>
		<comments>http://www.flexpert.be/2010/08/sneak-peak-to-my-session-at-adobe-max-2010/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 17:07:40 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[Event]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flash Catalyst]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Adobe MAX]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[LA]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[Los Angeles]]></category>
		<category><![CDATA[speaker session]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=607</guid>
		<description><![CDATA[Adobe MAX 2010 is less than 2 months away and while I&#8217;m in full preparation for my lab sessions I though I&#8217;d give a small teaser about what you can expect from it. The lab I&#8217;m doing is going to be about the designer-developer workflow topic, which has become quite hot since Flash Catalyst has [...]]]></description>
			<content:encoded><![CDATA[<div style="float:left; margin-right:10px"><a href="http://max.adobe.com/?sdid=ERZUY"><img src="https://max2010.assets.confreg.com/images/MAX09_B88x31.jpg" width="88" height="31" border="0" /></a></div>
<p>Adobe MAX 2010 is less than 2 months away and while I&#8217;m in full preparation for <a href="http://bit.ly/aNnjKH">my lab sessions</a> I though I&#8217;d give a small teaser about what you can expect from it.</p>
<p>The lab I&#8217;m doing is going to be about the designer-developer workflow topic, which has become quite hot since Flash Catalyst has been released. I&#8217;ll be giving a brief introduction to Flash Catalyst for those who are not yet familiar with it. After that, I&#8217;ll talk a bit about the different kinds of workflows when using Flash Builder and Flash Catalyst. And of course you will get your hands dirty on the exercises to show you some cool tips and tricks. You will also walk away with a fully working web shop component (not including payment modules of course, since that would take us too far of-topic).</p>
<p>There are two sessions. The first one is held on Monday, October 25 at 5.00 PM and is already almost full. The second session is on Wednesday, October 27 in the morning. I know this is the morning after the MAX awards, but if I can make it there, then so can you. So, if you haven&#8217;t already registered, you should hurry before the session runs full.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2010/08/sneak-peak-to-my-session-at-adobe-max-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controlling Phidgets with an AIR application on Android</title>
		<link>http://www.flexpert.be/2010/07/controlling-phidgets-with-air-on-android/</link>
		<comments>http://www.flexpert.be/2010/07/controlling-phidgets-with-air-on-android/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 08:29:40 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[maze]]></category>
		<category><![CDATA[motor controller]]></category>
		<category><![CDATA[Phidgets]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[servo]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=556</guid>
		<description><![CDATA[Some time ago I was watching an episode of &#8220;Prototype This&#8221; and was thinking that these guys have an awesome job of creating mechanical prototypes and interfacing them with some fancy programming. That got me thinking about some things that seemed quite interesting to me and I started surfing the web for some affordable hardware. [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I was watching an episode of &#8220;Prototype This&#8221; and was thinking that these guys have an awesome job of creating mechanical prototypes and interfacing them with some fancy programming. That got me thinking about some things that seemed quite interesting to me and I started surfing the web for some affordable hardware.</p>
<p>I then came across <a href="http://www.phidgets.com">Phidgets motor controllers</a> and I was immediately interested in it, mainly because it has an Flash/Flex Actionscript library that allows your Flash or Flex application to communicate with that controller. So I ordered one and started working on an application. What I came up with is a wooden maze that is placed on 4 servo motors and I can now control the maze by using a socket connection on mu Android phone running Android 2.1 (Eclair). I needed a special construction to get the rotational movement converted into a vertical movement to lift and tilt the maze and it kind of worked. I would have preferred to use linear motors instead, but they were just way too expensive for me. This did the trick as well. It was just a little harder to get the setup right. Just watch the video and keep in mind that this is merely a prototype.</p>
<p><center><br />
<script type="text/javascript">
    		var parameters =
    			{	id: "1"
    			,	src: "http://www.flexpert.be/tutorials/AIRonAndroid/PhidgetsMaze.flv"
    			,	autoPlay: "false"
    			,   width: "360"
    			,   height: "301"
				,	autoHideControlBar: "false"
				,	controlBarPosition: "bottom"
    			};
    		// Embed the player SWF:
    		swfobject.embedSWF
				( "/strobe/StrobeMediaPlayback.swf"
				, "player"
				, parameters["width"], parameters["height"]
				, "10.0.0"
				, {}
				, parameters
				, { allowFullScreen: "true" }
				, { name: "StrobeMediaPlayback" }
				);		
     </script></p>
<div id="player">
<p>Please install Flash Player 10.0 or higher</p>
</p></div>
<p></center></p>
<p>If you want to investigate this source code even further, you can download the source file <a href="http://www.flexpert.be/tutorials/AIRonAndroid/MazeController.mxml">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2010/07/controlling-phidgets-with-air-on-android/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://www.flexpert.be/tutorials/AIRonAndroid/PhidgetsMaze.flv" length="32533517" type="video/x-flv" />
		</item>
		<item>
		<title>Applications in AIR on Android</title>
		<link>http://www.flexpert.be/2010/06/applications-in-air-on-android/</link>
		<comments>http://www.flexpert.be/2010/06/applications-in-air-on-android/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 13:14:54 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flash Catalyst]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[BTicino]]></category>
		<category><![CDATA[domotics]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[solar panel monitor]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=512</guid>
		<description><![CDATA[This time I would like to share a small video with you guys. It&#8217;s about a couple of AIR applications that I&#8217;ve created. The first one in the video is a solar panel monitor application, which monitor the power output of my solar panels at home. This one works over the internet as well, since [...]]]></description>
			<content:encoded><![CDATA[<p>This time I would like to share a small video with you guys. It&#8217;s about a couple of AIR applications that I&#8217;ve created. The first one in the video is a solar panel monitor application, which monitor the power output of my solar panels at home. </p>
<p>This one works over the internet as well, since it simply downloads a CVS file every 10 minutes to automatically update the application. The design was made in Illustrator, brought into Flash Catalyst to get the arrow working and finally I took it to Flash Builder to attach the HTTPService that fetches the data. You can read the full implementation in my book <a href="http://www.amazon.com/Flash-Builder-Catalyst-Workflow-Essential/dp/1430228350/ref=pd_rhf_p_t_1" target="_blank">&quot;Flash Builder and Flash Catalyst: The New Workflow&quot;</a> as well, since it&#8217;s one of the many examples in there.</p>
<p>The second application is a remote control for my <a href="http://www.bticino.com" target="_blank">BTicino</a> domotics system. I&#8217;ve been wanting to do this for a very long time now. But up until now I just couldn&#8217;t do it, because you couldn&#8217;t create this thing in Flash Lite 3. But now, with AIR on Android (and soon on other mobile platforms as well) I could create a socket connection to my MH200 controller and feed it directly with my input to control the shutters and lights. Naturally, the possibilities are only limited by your imagination.</p>
<p>Both applications are Flex 4 applications, which proves that, despite the fact that the Flex framework isn&#8217;t optimised for these mobile devices and Slider (special Flex framework for mobile) isn&#8217;t yet available, the application still works pretty damn well. Loading times are not that bad either. Imagine what an optimised Flex framework will be able to perform then&#8230;</p>
<p><center><br />
<script type="text/javascript">
    		var parameters =
    			{	id: "1"
    			,	src: "http://www.flexpert.be/tutorials/AIRonAndroid/AIRonAndroid.f4v"
    			,	autoPlay: "false"
    			,   width: "360"
    			,   height: "299"
				,	autoHideControlBar: "false"
				,	controlBarPosition: "bottom"
    			};
    		// Embed the player SWF:
    		swfobject.embedSWF
				( "/strobe/StrobeMediaPlayback.swf"
				, "player"
				, parameters["width"], parameters["height"]
				, "10.0.0"
				, {}
				, parameters
				, { allowFullScreen: "true" }
				, { name: "StrobeMediaPlayback" }
				);		
     </script></p>
<div id="player">
<p>Please install Flash Player 10.0</p>
</p></div>
<p></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2010/06/applications-in-air-on-android/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Solving the &#8220;missing AIR application XML file&#8221; error in Flash Builder</title>
		<link>http://www.flexpert.be/2010/04/solving-the-missing-air-application-xml-file-error-in-flash-builder/</link>
		<comments>http://www.flexpert.be/2010/04/solving-the-missing-air-application-xml-file-error-in-flash-builder/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 18:27:42 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[app.xml]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[code-behind]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=440</guid>
		<description><![CDATA[When creating an AIR project, you automatically get an XML configuration file for your application, which contains the initial width and height, the available icons and the indication whether or not the application uses a custom chrome (amongst other settings). This XML file has the same name as the application itself, followed by &#8220;-app.xml&#8221;. OK, [...]]]></description>
			<content:encoded><![CDATA[<p>When creating an AIR project, you automatically get an XML configuration file for your application, which contains the initial width and height, the available icons and the indication whether or not the application uses a custom chrome (amongst other settings). This XML file has the same name as the application itself, followed by &#8220;-app.xml&#8221;. OK, so now you know what exactly I&#8217;m talking about, let me explain the problem.</p>
<p>When creating AIR applications, you often create custom components, which you place in separate packages to help organize the structure of your project. And every once in a while you will also <strong>create a custom component that extends the WindowedApplication class</strong>, for example to create an application that automatically updates itself when a new version becomes available. such a component would look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> AutoUpdater <span style="color: #0066CC;">extends</span> WindowedApplication <span style="color: #66cc66;">&#123;</span>
&nbsp;
  <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> appUpdater:ApplicationUpdaterUI;
&nbsp;
  <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> AutoUpdater<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    appUpdater = <span style="color: #000000; font-weight: bold;">new</span> ApplicationUpdaterUI<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    addEventListener<span style="color: #66cc66;">&#40;</span>FlexEvent.<span style="color: #006600;">APPLICATION_COMPLETE</span>, startAutoUpdate<span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> startAutoUpdate<span style="color: #66cc66;">&#40;</span>event:FlexEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
    appUpdater.<span style="color: #006600;">configurationFile</span> = <span style="color: #000000; font-weight: bold;">new</span> File<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;app:/updateConfig.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;
    appUpdater.<span style="color: #006600;">isCheckForUpdateVisible</span> = <span style="color: #000000; font-weight: bold;">false</span>;
    appUpdater.<span style="color: #006600;">isDownloadUpdateVisible</span> = <span style="color: #000000; font-weight: bold;">false</span>;
    appUpdater.<span style="color: #006600;">isDownloadProgressVisible</span> = <span style="color: #000000; font-weight: bold;">false</span>;
    appUpdater.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>UpdateEvent.<span style="color: #006600;">INITIALIZED</span>, autoUpdateInitialised<span style="color: #66cc66;">&#41;</span>;
    appUpdater.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> autoUpdateInitialised<span style="color: #66cc66;">&#40;</span>event:UpdateEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
    appUpdater.<span style="color: #006600;">checkNow</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Now, you can simply extend your new application from this AutoUpdater class by declaring it as the root tag of your main application file. However, <strong>in Flash Builder 4 this generates an error, as shown in the picture below</strong>.</p>
<p><center><a href="http://www.flexpert.be/wp-content/uploads/FBerrors.png"><img src="http://www.flexpert.be/wp-content/uploads/FBerrors.png" alt="Compilation issues in Flash Builder" title="Compilation issues in Flash Builder" style="border:0" width="600" height="154" class="aligncenter size-full wp-image-442" /></a></center></p>
<p> In this screenshot you notice there are two errors, since for my project I also created another custom class which implements the URL monitoring system as well, on top of the automatic updates. <strong>Apparently the compiler expects each application to have its own XML configuration file</strong>, even though those components are not the actual starting point for your application.</p>
<p><strong>To solve this problem you simply have to go to the project settings dialog.</strong> In that dialog you go to the &#8220;Flex Applications&#8221; part by selecting it on the left side. Within that section you can see each application within your project &#8211; yes, a single project can contain more than one applications.</p>
<p><center><a href="http://www.flexpert.be/wp-content/uploads/FBProjectSettings.png"><img src="http://www.flexpert.be/wp-content/uploads/FBProjectSettings.png" alt="Flash Builder Project Settings" title="Flash Builder Project Settings" style="border:0" width="600" height="373" class="aligncenter size-full wp-image-441" /></a></center></p>
<p>You can notice that the AutoUpdater class (and in my case the MonitoredAutoUpdater class as well) is flagged as an application. Just <strong>select that application and click the &#8220;Remove&#8221; button</strong>. This will not remove the file from the project, but instead it just removes the application flag. And because the compiler will no longer recognize it as an actual appliaction, it will not search for that XML configuration file anymore, thus solving your problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2010/04/solving-the-missing-air-application-xml-file-error-in-flash-builder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a custom combobox using Flash Catalyst</title>
		<link>http://www.flexpert.be/2010/04/creating-a-custom-combobox-using-flash-catalyst/</link>
		<comments>http://www.flexpert.be/2010/04/creating-a-custom-combobox-using-flash-catalyst/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 06:55:12 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flash Catalyst]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[combobox]]></category>
		<category><![CDATA[components]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=419</guid>
		<description><![CDATA[Comboboxes are great components, but unfortunately, at the moment you cannot create a custom combobox in Flash Catalyst by simply using the HUD or right-click menu to convert the artwork. In my book &#8220;Flash Builder and Flash Catalyst: the new workflow&#8221; ( http://www.friendsofed.com/book.html?isbn=1430228350) I created a design for an e-commerce application where I used a [...]]]></description>
			<content:encoded><![CDATA[<p>Comboboxes are great components, but unfortunately, at the moment you cannot create a custom combobox in Flash Catalyst by simply using the HUD or right-click menu to convert the artwork. In my book &#8220;Flash Builder and Flash Catalyst: the new workflow&#8221; ( <a href="http://www.friendsofed.com/book.html?isbn=1430228350">http://www.friendsofed.com/book.html?isbn=1430228350</a>) I created a design for an e-commerce application where I used a custom combobox.  The design looks like this.</p>
<h3 style="margin-bottom:10px">The design</h3>
<p style="text-align: center"><a href="http://www.flexpert.be/wp-content/uploads/Peeters28356fig0603.jpg"><img class="aligncenter size-full wp-image-425" title="Custom combobox in the sidebar" src="http://www.flexpert.be/wp-content/uploads/Peeters28356fig0603.jpg" alt="Custom combobox in the sidebar" width="600" height="375" /></a></p>
<p>At the bottom of the navigation sidebar you are going to <strong>add yet another section</strong>. This time the section will contain <strong>a dropdown combobox that contains the categories in which the pictures from the photo gallery are divided</strong>. You could opt to get the categories list from the database, but since we only have four categories to add in this combobox, you might as well do it hard coded this time. So, add the following items to the combobox dropdown section which has a light gray background color:</p>
<ul>
<li> All</li>
<li> Waterfalls</li>
<li> Reflections</li>
<li> Lakes</li>
<li> Mountains</li>
</ul>
<p>I&#8217;ve deliberately chosen not to place them in an alphabetical order because I&#8217;m assuming that the top items will be the ones users are going to look for the most. Of course, you can place the items in an alphabetical order if you find this more suitable.</p>
<p>The combobox itself will get a focus color gradient indicating when it has the input focus. Use the same green-ish gradient colors for all gradients in the application. And next to the rectangle that holds the selected item, you draw a smaller square with an arrow in it. This will act as the trigger to open the dropdown list for the combobox component. Underneath the combobox there also has to be <strong>a button that allows the user to actually confirm the selection he&#8217;s made for filtering the photos</strong> he wants to view inside of the photo gallery.</p>
<h3 style="margin-bottom:10px">Bringing the component to life</h3>
<p>If you really think about it, you have to break down the combobox into basic parts and what I&#8217;ve come up with is the idea that a combobox is really nothing more than a Toggle Button with an additional Data List component in the toggled state. But that doesn&#8217;t make it an easy component to create from scratch. Also the fact that the selected item must be displayed in the collapsed combobox state means that we are going to have to do some custom programming in Flash Builder later on to dynamically fill out that value depending on the selected item in the Data List part of the component.</p>
<p>So let&#8217;s start working on this component by <strong>selecting the &#8220;</strong>Dropdown&#8221; <strong>and &#8220;</strong>Dropdown values&#8221; <strong>layer groups in the</strong> Layers <strong>panel and convert it into a</strong> Custom/Generic Component. Rename that component to &#8220;SearchComboBox&#8221;. Double click the newly created component, select the combobox rectangle, the selected value and the arrow button and convert that into a Toggle Button. Double click that component again and <strong>assign the label for the button</strong>, making it as wide as possible to fit the entire component and sharing this change with the other states again. <strong>Render the</strong> Focus color <strong>layer invisible for the</strong> Up <strong>and</strong> Disabled <strong>states.</strong> Before continuing with the other states you first have to convert the Dropdown values layer group into a Data List component. So, select that group and choose Convert Artwork to Component &gt; Data List from the right click popup menu. In the component you still have to indicate the list items and their states. <strong>Double click the new component and select the selected item in the design to create the</strong> Repeated Item <strong>part. </strong> Space the items 2 pixels from each other, fill out the Design-Time Data panel to contain the five possible selection items and remove the other values in the design layer. <strong>Double click the repeated item component to dive into it.</strong> Remove the background color for the Up state. For the Over state, select the background layer and set the Opacity level to 50 in the Common section of the Properties panel. This will show a difference between the selected item and the one the user is hovering to possibly select. That&#8217;s it for the Data List component, <strong>so go back up one level</strong> using the bread crumbs at the top of the artboard. <strong>Rename the list component</strong> to &#8220;SearchValuesList&#8221; in the Library panel.</p>
<p><strong>Again, go up one level so you reach the</strong> SearchComboBox <strong>level again.</strong>In this component you still need to <strong>make that list component visible in the proper state</strong>. In fact, you still need to make the proper states in the component. So, go ahead and <strong>duplicate the state in the</strong> Pages/States <strong>panel three times</strong> and name the states appropriately</p>
<ul>
<li> Up</li>
<li> Over</li>
<li> Down</li>
<li> Disabled</li>
</ul>
<p><strong>In the</strong> Up <strong>and</strong> Disabled <strong>states, you make the data list invisible</strong>, because this will be the normal state. <strong>In the</strong> Over <strong>state, you need to set the toggle button&#8217;s</strong> Selected <strong>property to true</strong> by checking the checkbox in the Common section of the Properties panel. This will show the selection color for the combobox. <strong>You do the same thing for the</strong> Down <strong>state. Additionally you have to make the</strong> SerchValuesList <strong>component visible. In the</strong> Disabled <strong>state you need to set the button component disabled</strong> by unchecking the Enabled checkbox in the Common section of the Properties panel.</p>
<p>Now you have defined the states for the component, but you still have to define how the application will go from one state to another. Let&#8217;s start with the Data List part since this is the easy one. You <strong>select the</strong> SearchValuesList <strong>component</strong> in the Layers panel and <strong>add the following interaction</strong>:</p>
<ul>
<li> Event: On Select</li>
<li> Action: Play Transition to State</li>
<li> State: Over</li>
<li> When: When any item is selected</li>
</ul>
<p>Going back to the Over state keeps the focus rectangle displayed after a selection has been made in the list component.</p>
<p>For the combobox part itself it is slightly more complicated and there are a couple of interactions you have to define. Let&#8217;s handle them in the same order as the chain of events that take place when a visitor uses this component. The first event that will happen is the user hovering over the component. <strong>So, add the following interaction for the combobox component:</strong></p>
<ul>
<li> Event: On Roll Over</li>
<li> Action: Play Transition to State</li>
<li> State: Over</li>
<li> When: When in Up</li>
</ul>
<p>The next event that will occur is the fact that the user click on the combobox to open it. That means that you have to go from the Over state (not the Up state) to the Down state for the component by <strong>adding the interaction</strong>:</p>
<ul>
<li> Event: On Click</li>
<li> Action: Play Transition to State</li>
<li> State: Down</li>
<li> When: When in Over</li>
</ul>
<p>Then the user can go in two directions. Either he selects an item in the list, which you&#8217;ve already covered by capturing the event on the SearchValuesList component. Or he can cancel the selection choice. In this last case the user actually clicks on the combobox component again. That is why you needed to add a condition to the view state change before. <strong>Now you need to add a similar interaction, but the other way around:</strong></p>
<ul>
<li> Event: On Click</li>
<li> Action: Play Transition to State</li>
<li> State: Over</li>
<li> When: When in Down</li>
</ul>
<p>Now the combobox is closed again, but the hover color is still visible. That means there is only one more possible event and that is the user moving the mouse cursor away from the combobox component. <strong>So, on the combobox component you need to add one last interaction to go back to the normal state:</strong></p>
<ul>
<li> Event: On Roll Out</li>
<li> Action: Play Transition to State</li>
<li> State: Up</li>
<li> When: When in Over</li>
</ul>
<p style="text-align: center;"><a href="http://www.flexpert.be/wp-content/uploads/Peeters28356fig0611.jpg"><img class="aligncenter size-full wp-image-424" title="Interactions on the combobox component" src="http://www.flexpert.be/wp-content/uploads/Peeters28356fig0611.jpg" alt="Interactions on the combobox component" width="308" height="275" /></a></p>
<p>Adding all of these events to the component will render your generic component into a working combobox. If you like, you can still add a couple of transitions to the view state changes to make the (dis)appearing of the data list a little smoother, but it is not strictly necessary for our user experience.</p>
<p>I know it&#8217;s a bit of work to get this far, butat the time of writing there is no Spark equivalent for the ComboBox component, so you can use this method to easily create such a component directly from within Flash Catalyst. But at this point you&#8217;re done with the component for now and you <strong>go back to the main design level and rename the component</strong> to &#8220;SearchCombobox&#8221;.</p>
<h3 style="margin-bottom:10px">Adding interaction in Flash Builder</h3>
<p>Once you&#8217;ve imported the project into Flash Builder, you can find the custom combobox component in the components package under the name SearchComboBox.mxml. The first thing that isn&#8217;t working yet is the fact that when you select a certain value in the dropdown list part of the component, the label in the button part is not automatically updated. By default all items should be visible in the photo gallery. That means that you have to initialize the component to have that item selected. <strong>On the</strong> &lt;s:List&gt; <strong>component in the source, you simply set the</strong> selectedIndex <strong>property to zero.</strong> That will initialize the component when it&#8217;s first created. <strong>For the</strong> &lt;s:ToggleButton&gt; <strong>tag you simply change the value of the</strong> label <strong>property to &#8220;ALL&#8221;.</strong>Just run the application and you&#8217;ll see the component properly initialized this time.</p>
<p>Next up is solving the setting of the label when a certain item has been selected in the dropdown list. So, <strong>on the</strong> &lt;s:List&gt; <strong>component you see that an event handler for the</strong> change <strong>event has already been declared for going back to the</strong> Over <strong>state</strong>. This handler will react both to a mouse click and a selection made by using the arrow keys. Now, locate that event handler and inside of it you need to <strong>set the label of the button component to the selected item in the list component</strong>. You may need to add some identifiers for the components before you can refer to them in your ActionScript code. Don&#8217;t forget the fact that you are dealing with a complex data structure as list items, so you should reference only the text part of the item to assign it to the labelproperty of the &lt;s:ToggleButton&gt;component.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">protected <span style="color: #000000; font-weight: bold;">function</span> list_changeHandler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
  currentState=<span style="color: #ff0000;">'Over'</span>;
&nbsp;
  <span style="color: #0066CC;">button</span>.<span style="color: #006600;">label</span> = <span style="color: #0066CC;">list</span>.<span style="color: #006600;">selectedItem</span>.<span style="color: #006600;">text1</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Naturally you could choose to implement this functionality upon the click event or the &lt;ENTER&gt; key for example. The principle stays the same. It&#8217;s just a different event that is triggering the selection.</p>
<p>(This post was also previously published on <a title="Adobe Cookbooks" href="http://cookbooks.adobe.com" target="_blank">http://cookbooks.adobe.com</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2010/04/creating-a-custom-combobox-using-flash-catalyst/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>It’s D-day: Adobe releases Flex 4 SDK, Flash Builder 4, ColdFusion Builder and Flash Platform Services for Social Network Integration</title>
		<link>http://www.flexpert.be/2010/03/it%e2%80%99s-d-day-adobe-releases-flex-4-sdk-flash-builder-4-coldfusion-builder-and-flash-platform-services-for-social-network-integration/</link>
		<comments>http://www.flexpert.be/2010/03/it%e2%80%99s-d-day-adobe-releases-flex-4-sdk-flash-builder-4-coldfusion-builder-and-flash-platform-services-for-social-network-integration/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 08:48:57 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[ColdFusion Builder]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[CF Builder]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[SDK]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=412</guid>
		<description><![CDATA[Yes! This is the moment we’ve all been waiting for so long. After a long series of beta and prerelease versions, the new Flex 4 SDK has been officially released. And of course, this release is also accompanied with the release of Flash Builder 4. This is the new version of Flex Builder (for those [...]]]></description>
			<content:encoded><![CDATA[<p>Yes! This is the moment we’ve all been waiting for so long. After a long series of beta and prerelease versions, <strong>the new Flex 4 SDK has been officially released</strong>. And of course, this release is also <strong>accompanied with the release of Flash Builder 4</strong>. This is the new version of Flex Builder (for those of you who live on another planet and haven’t heard of it yet) and it contains a lot of great new and improved features:</p>
<ul>
<li>Data/Services panel to allow a very easy connection with different kinds of back end technologies such as ColdFusion, Java, PHP and HTTP services.</li>
<li>Automatic Data Transfer Object (Value Object) creation based on the return types of the services</li>
<li>Drag &amp; drop attachment of data to visual components</li>
<li>Enhanced refactoring support</li>
<li>Code generation of getters and setters</li>
<li>Network traffic monitoring</li>
<li>Enhanced memory profiling support</li>
<li>…</li>
</ul>
<p>I’ve been working with the prerelease versions for quite some time now and I must say I’m pretty found of the new features they’ve put in there. In short, this is one release you want to upgrade to as soon as possible. So, go ahead and point your browser to <a href="http://www.adobe.com/products/flex/" target="_blank">http://www.adobe.com/products/flex/</a> and download the latest version.</p>
<p><strong>As second important release is ColdFusion Builder.</strong> In the early days you had ColdFusion Studio, but other than that, there was no real specific ColdFusion IDE available. So developers had to work with Dreamweaver and open source Eclipse plug-ins such as CFEclipse. But now, there is finally another new and improved ColdFusion IDE available and it’s called ColdFusion Builder. It is also based on Eclipse, which means that you can either install it as a stand-alone version or as a plug-in on top of your existing Eclipse installation. That means that you can also write your own extensions for ColdFusion Builder to help you (and other developers) write code a lot easier. You can have extensions for code snippets, templates, query generation etc. You even have an extension to help you write your own extensions!</p>
<p>This is similar to what you can do with Flash Builder as well, so if you’re a Flex developer and you also use ColdFusion as back end technology, <strong>you might be better off integrating both development environments into the same IDE</strong>. That can save you a lot of time not having to switch tools all the time. Just go ahead and download it at <a href="http://www.adobe.com/products/coldfusion/" target ="_blank">http://www.adobe.com/products/coldfusion/</a>.</p>
<p><strong>The last release of today is the Flash Platform Services for Social Network Integration.</strong> Wow, now that’s a term to remember. But what the hell does it mean? Well for starters it means that Adobe is <strong>making life simple for people who want to connect their Flash applications to social networks</strong>. The Social service has the following benefits:</p>
<ul>
<li>One      API connects your application with multiple social networks</li>
<li>The      service adapts to social network changes so you don&#8217;t need to recompile      your application</li>
<li>Multiple pricing plans      available</li>
</ul>
<p>The social service consists of three parts:</p>
<ul>
<li>A      simple ActionScript 3 API, which can be implemented in Flash or Flex and      aggregates the different social network APIs, including Facebook Connect</li>
<li>Plug-and-play      widgets that use the social API for login, share, invite, select friends      and other commands</li>
<li>Dashboard      analytics for reviewing and optimizing your social performance</li>
</ul>
<p>Now, what does all that mean? Well, it means that <strong>you no longer have to worry about the ever changing Facebook or Twitter APIs, because the Social services will take care of the for you.</strong> You just write your code against the Social services API and the changes in the network services such as Facebook or Twitter are being monitored by Adobe and Gigya to make sure your applications don’t break when a new API is released. If you want to know more about this, you can always look at <a href="http://www.adobe.com/devnet/flashplatform/services/social/" target="_blank">http://www.adobe.com/devnet/flashplatform/services/social/</a>.</p>
<p>So, I must say that today is a very big day in my professional life, since I’m working with both Flex and ColdFusion. From now on, life as a Flex developer is going to be a lot easier…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2010/03/it%e2%80%99s-d-day-adobe-releases-flex-4-sdk-flash-builder-4-coldfusion-builder-and-flash-platform-services-for-social-network-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ben Forta is coming to Belgium</title>
		<link>http://www.flexpert.be/2010/02/ben-forta-is-coming-to-belgium/</link>
		<comments>http://www.flexpert.be/2010/02/ben-forta-is-coming-to-belgium/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 13:18:48 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Ben Forta]]></category>
		<category><![CDATA[CFUG]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=341</guid>
		<description><![CDATA[For those of you who don&#8217;t know Ben Forta, he&#8217;s the Adobe senior product evangelist and the author of numerous books about ColdFusion (nad other technologies). He&#8217;s also the director of the evangelism team. Every once in a while you get the chance to meet with him at some ColdFusion event, but not often in [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who don&#8217;t know <a href="http://www.forta.com" target="_blank">Ben Forta</a>, he&#8217;s the Adobe senior product evangelist and the author of numerous books about ColdFusion (nad other technologies). He&#8217;s also the director of the evangelism team.</p>
<p>Every once in  a while you get the chance to meet with him at some ColdFusion event, but not often in Belgium. Well, here&#8217;s your chance now, because on March 9, 2010 he&#8217;s coming to Liege/Luik in Belgium. This event will not be about ColdFusion alone. There will alo be presentations on Flash Builder 4 and AIR 2.0. Tickets are free, but seats are limited, so hurry up and secure your seat at <a href="http://rialiege.eventbrite.com/" target="_blank">http://rialiege.eventbrite.com/</a>.</p>
<p>I hope to see you guys there&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2010/02/ben-forta-is-coming-to-belgium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pre-order my book</title>
		<link>http://www.flexpert.be/2009/12/pre-order-my-book/</link>
		<comments>http://www.flexpert.be/2009/12/pre-order-my-book/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 13:33:36 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flash Catalyst]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=323</guid>
		<description><![CDATA[Hey guys, I know it has been rather quiet on my site lately. The reason for this is the fact that I&#8217;m currently writing a book. Now, what is it going to be about? Some of you may know this already by reading my Twitter posts or by following my LinkedIn status messages. For the [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right;margin-left:20px;margin-top:30px">
<a href="http://www.amazon.com/Flash-Builder-Catalyst-Workflow-Essential/dp/1430228350/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1260451049&#038;sr=8-1" target="_blank"><img src="http://flexpert.be/images/book.jpg"></a>
</div>
<p style="display:block">Hey guys,</p>
<p>I know it has been rather quiet on my site lately. The reason for this is the fact that I&#8217;m currently writing a <a href="http://www.friendsofed.com/book.html?isbn=1430228350" target="_blank">book</a>. Now, what is it going to be about? Some of you may know this already by reading my Twitter posts or by following my LinkedIn status messages. For the others, I can say for now that it is about Flash Builder and Flash Catalyst and how those products are going to change the way you work on Flex projects as a developer. As a designer (or interaction designer) you are going to be more closely involved in creating and maintaining Flex 4 applications when using these products.</p>
<p>So, basically, it is not going to be a manual about Flash Builder, nor is it a manual about Flash Catalyst. But it is a guideline with general best practices and designer-developer workflow situations, explained in a very practical way.</p>
<p>You can now already pre-order the book on Amazon.com or by clicking on the cover image.  Don&#8217;t mind the cover image for now. This is just a preliminary image, which will change by the time it is going to be released. The release date should be somewhere around April 2010.</p>
<p>Hopefully, you&#8217;ll like it&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2009/12/pre-order-my-book/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
