<?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>tweenOut &#187; Flex</title>
	<atom:link href="http://www.blog.tweenout.com/category/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.tweenout.com</link>
	<description>Flash &#38; Flex Stuff</description>
	<lastBuildDate>Mon, 16 Aug 2010 18:12:42 +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>Flex ComboBox Issues</title>
		<link>http://www.blog.tweenout.com/flex-combobox-issues/</link>
		<comments>http://www.blog.tweenout.com/flex-combobox-issues/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 17:26:11 +0000</pubDate>
		<dc:creator>Todd Shelton</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[ComboBox]]></category>
		<category><![CDATA[combobox enabled]]></category>
		<category><![CDATA[flex combobox]]></category>
		<category><![CDATA[mx.control.ComboBox]]></category>
		<category><![CDATA[problems loading combobox]]></category>
		<category><![CDATA[setfocus]]></category>

		<guid isPermaLink="false">http://www.blog.tweenout.com/?p=376</guid>
		<description><![CDATA[So today I am working on a few bugs within our application that concerns the mx.controls.ComboBox. So the problem is that we are loading a list of font names into a combo box for a user to select. We then pass the name of the font to a FontManager (that we have created) that loads [...]]]></description>
			<content:encoded><![CDATA[<p>So today I am working on a few bugs within our application that concerns the mx.controls.ComboBox.</p>
<p>So the problem is that we are loading a list of font names into a combo box for a user to select. We then pass the name of the font to a FontManager (that we have created) that loads the fonts and dispatches a Complete event when it is loaded. We also have a few other custom events that are being dispatched like FONT_READY, and FONT_ERROR. When we compile the app the user can select the combo box then pick a font and the font loads just fine, but if the user starts using the arrow keys to navigate through the combo box really fast, the fonts do not load and if they do, they usually are messed up.</p>
<p>I traced out everything and it was saying the fonts were loaded and the text was displayed, but it wasn&#8217;t. I tried loading the two previous fonts to no avail; it always seemed like it was a timing issue. No matter what I did, the user could always move through the list using the arrow keys too fast for the font to load.</p>
<p>So I thought I would just do a fontSelector.enable = false; until the font is ready and then do a fontSelector.enable = true;, (fontSelector being my ComboBox), but this did not work since it still thought the font was being loaded and the user still could cycle through the list regardless. So the issue remains. I even tried to go deeper into a few Adobe classes but that is way to much for this fix and would mess up some other comboBoxes we are using.</p>
<p>So the solution I came up with is to setFocus to something else on the stage. I have a Color Picker on the stage as well, so when the user picks a font, it sets the focus to the ColorPicker colorPicker.setFocus();. Then when the font was ready, I set the focus back on the fontSelector, fontSelector.setFocus();. This seems to solve the issue, and the user still is able to use the arrow keys and move through the ComboBox, but this time the font has time to load and display properly before it lands on the next font in the list.</p>
<p>Now this may be a hack in some peoples eyes, but it works and I could not come up with anything else. If you know of another way to slow down the user&#8217;s comboBox selection, please comment here and let me know. If not, I hope this helps someone.</p>
<p>T</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.tweenout.com/flex-combobox-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting your SDK to work right in Flex</title>
		<link>http://www.blog.tweenout.com/getting-your-sdk-to-work-right-in-flex/</link>
		<comments>http://www.blog.tweenout.com/getting-your-sdk-to-work-right-in-flex/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 02:30:30 +0000</pubDate>
		<dc:creator>Todd Shelton</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex SDK]]></category>
		<category><![CDATA[Vector AS3]]></category>

		<guid isPermaLink="false">http://www.blog.tweenout.com/?p=284</guid>
		<description><![CDATA[After a much needed vacation I came back to work and realized I needed to start using the Flex SDK 4.0 for my new projects. So I thought that would be easy enough and just went to the web and downloaded it. Well there is a little bit more than that to get it to [...]]]></description>
			<content:encoded><![CDATA[<p>After a much needed vacation I came back to work and realized I needed to start using the Flex SDK 4.0 for my new projects. So I thought that would be easy enough and just went to the web and downloaded it. Well there is a little bit more than that to get it to work.</p>
<p>Okay my setup, I have Eclipse and I use the Flex plug-in and then I use Flash as my designing area. If you have never put a new SDK into Flex it is really easy. You have to goto Adobe and download the SDK your looking for. Then you have to unzip it and then you need to locate the folder in the Adobe Flex Plug-in folder that is named sdk&#8217;s. You then place the sdk you just unzipped into that folder.</p>
<p>Now open up Eclipse and goto project and then properties. Once in the properties menu click on the Compiler option on the left hand side. Once you click on this option you will see an option on the right hand side to pick your sdk. You need to click on configure and then browse to the folder you place the SDK you downloaded and once highlighted click ok. Now before you click OK on this main window you need to click the option to import all AIR classes. Once you do this you will be able to get the Vector class in your Flex project.</p>
<p>I hope this helps some of you.</p>
<p>Todd</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.tweenout.com/getting-your-sdk-to-work-right-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex and the Interface part 3.2</title>
		<link>http://www.blog.tweenout.com/flex-and-the-interface-part-32/</link>
		<comments>http://www.blog.tweenout.com/flex-and-the-interface-part-32/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 12:34:29 +0000</pubDate>
		<dc:creator>Todd Shelton</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.tshelton.com/blog/?p=59</guid>
		<description><![CDATA[This is the second part so enjoy. Get the Flash Player to see this player. Click here to download the 1024 x 768 version but you will need a flv player to watch it. You can get one of the players from the links on the right side under FLV Players.]]></description>
			<content:encoded><![CDATA[<p>This is the second part so enjoy.</p>
<p style="text-align: center;"><script src="https://media.dreamhost.com/swfobject.js" type="text/javascript"></script></p>
<div id="fflex640.flv"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<p><script type="text/javascript"><!--
var sd = new SWFObject('https://media.dreamhost.com/mediaplayer.swf','mpl','640','480','8');
sd.addParam('allowscriptaccess','always');
sd.addParam('allowfullscreen','true');
sd.addVariable('height','480');
sd.addVariable('width','640');
sd.addVariable('file','http://www.tshelton.com/tuts/fflex640.flv');
sd.write('fflex640.flv');
// --></script><br />
</p>
<div>Click <a href="http://www.tshelton.com/tuts/fflex2.2.flv">here</a> to download the 1024 x 768 version but you will need a flv player to watch it. You can get one of the players from the links on the right side under FLV Players.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.tweenout.com/flex-and-the-interface-part-32/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex and the Interface part 3.1</title>
		<link>http://www.blog.tweenout.com/flex-and-the-interface-part-31/</link>
		<comments>http://www.blog.tweenout.com/flex-and-the-interface-part-31/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 21:34:19 +0000</pubDate>
		<dc:creator>Todd Shelton</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.tshelton.com/blog/?p=50</guid>
		<description><![CDATA[This is a two part series so make sure you watch 3.1 and 3.2 to complete the entire tutorial Get the Flash Player to see this player. Click here to download the 1024 x 768 version but you will need a flv player to watch it. You can get one of the players from the [...]]]></description>
			<content:encoded><![CDATA[<p>This is a two part series so make sure you watch 3.1 and 3.2 to complete the entire tutorial</p>
<p style="text-align: center;"><script src="https://media.dreamhost.com/swfobject.js" type="text/javascript"></script></p>
<div id="fflex2.flv"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<p><script type="text/javascript"><!--
var sd = new SWFObject('https://media.dreamhost.com/mediaplayer.swf','mpl','640','480','8');
sd.addParam('allowscriptaccess','always');
sd.addParam('allowfullscreen','true');
sd.addVariable('height','480');
sd.addVariable('width','640');
sd.addVariable('file','http://www.tshelton.com/tuts/fflex2.flv');
sd.write('fflex2.flv');
// --></script><br />
</p>
<div>Click <a href="http://www.tshelton.com/tuts/fflex1024.flv">here</a> to download the 1024 x 768 version but you will need a flv player to watch it. You can get one of the players from the links on the right side under FLV Players.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.tweenout.com/flex-and-the-interface-part-31/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex and the Interface part 2</title>
		<link>http://www.blog.tweenout.com/flex-and-the-interface-part-2/</link>
		<comments>http://www.blog.tweenout.com/flex-and-the-interface-part-2/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 13:39:46 +0000</pubDate>
		<dc:creator>Todd Shelton</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.tshelton.com/blog/?p=18</guid>
		<description><![CDATA[  Get the Flash Player to see this player. var sd = new SWFObject('https://media.dreamhost.com/mediaplayer.swf','mpl','640','480','8'); sd.addParam('allowscriptaccess','always'); sd.addParam('allowfullscreen','true'); sd.addVariable('height','480'); sd.addVariable('width','640'); sd.addVariable('file','http://www.tshelton.com/tuts/firstFlex_640x480.flv'); sd.write('firstFlex_640x480.flv');   Let&#8217; get started using Flex and learn how to create a new MXML project and make a small application. With Flex open go to the option bar and click File &#62; New &#62; Flex [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"> <script type="text/javascript" src="https://media.dreamhost.com/swfobject.js"></script></p>
<div id="firstFlex_640x480.flv"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<p><script type="text/javascript">
var sd = new SWFObject('https://media.dreamhost.com/mediaplayer.swf','mpl','640','480','8');
sd.addParam('allowscriptaccess','always');
sd.addParam('allowfullscreen','true');
sd.addVariable('height','480');
sd.addVariable('width','640');
sd.addVariable('file','http://www.tshelton.com/tuts/firstFlex_640x480.flv');
sd.write('firstFlex_640x480.flv');
</script></p>
<p> </p>
<p style="text-align: left;">Let&#8217; get started using Flex and learn how to create a new MXML project and make a small application.</p>
<p>With Flex open go to the option bar and click File &gt; New &gt; Flex Project.</p>
<div id="attachment_26" class="wp-caption alignright" style="width: 260px"><a href="http://www.tshelton.com/blog/wp-content/uploads/2008/10/newdialog.jpg"><img class="size-medium wp-image-26" title="newdialog" src="http://www.tshelton.com/blog/wp-content/uploads/2008/10/newdialog.jpg" alt="New Project Dialog Box" width="250" height="226" /></a><p class="wp-caption-text">New Project Dialog Box</p></div>
<div id="attachment_25" class="wp-caption alignnone" style="width: 310px"><a href="http://www.tshelton.com/blog/wp-content/uploads/2008/10/flexnewmxml.jpg"><img class="size-medium wp-image-25" title="flexnewmxml" src="http://www.tshelton.com/blog/wp-content/uploads/2008/10/flexnewmxml-300x225.jpg" alt="new Flex project" width="300" height="225" /></a><p class="wp-caption-text">new Flex project</p></div>
<p>In this dialog box you will enter the name to your new project. I named my firstProject you can save it in another location but I left mine in the default location of My Documents/Flex 3. Just leave there rest as the default settings, we will get into the AIR applications later. Now click the Finish button and that will set up the project and create all the folders needed for the project to work.</p>
<p>It will take a second to load up and when it does you will see an MXML with your your projects name now open in the workspace. You will see two buttons located at the top of the workspace<br />
<a href="http://www.tshelton.com/blog/wp-content/uploads/2008/10/sourcedesign.jpg"><img class="alignleft size-medium wp-image-28" title="sourcedesign" src="http://www.tshelton.com/blog/wp-content/uploads/2008/10/sourcedesign.jpg" alt="" width="171" height="103" /></a> one says Source and the other is Design. Design will show you the design view and Source will show you the code view only. As you get used to using ActionScript 3 you will spend most of your time in the Source view but if you are coming from Flash and have a lot of design experience then you will keep wanting to use the Design view to do everything but it will change trust me.</p>
<p>Now click on Design view and you will see all the properties and components that are available. There are too many to list here but as we use them I will try to explain what they do if need be.</p>
<p>We also need to make sure you have the Flex Properties window open. So go to Window &gt; Flex Properties and click. This will bring up the Flex Properties on the right side of the workspace.</p>
<p>So let’s put something on the stage. We need to make sure we are in the design view so click on the Design tab at the top of the page and this will show you the default color background and the stage to put things on.</p>
<p>Now we are going to put a button on the stage so located at the bottom left of your stage you should have the Components tab, if you don’t have it click, window &gt; Components, and the tab will appear. Now click the plus sign to the left of the controls folder to expand it and you will see all the components located inside. Here is where you will find the button we are looking for.</p>
<p>So click on the button and drag it to the upper left corner of the stage. You will notice that the button says Button on it. We can change this by going to the Flex Properties tab and under the Label field rename it Hello World. Notice how it resized to fit the words that were placed inside the button?</p>
<p>Now we need to put a text box on the stage as well. So back in the Control folder go down to where it says Text and click and drag it to the center of the stage.</p>
<p>We want to give this Text box an ID so in the Flex Properties tab go to the ID field and type an id name. I’m naming mine txtBox.</p>
<p>Lets format the text as well so make sure you click on the text box on the stage and in the Flex Properties tab under the text field change the size to 20 and the color to White or xFFFFFF.</p>
<p>Why we are in the text properties let’s take out the word Text in the test field and leave it blank.  As soon as you click out of the box you will notice a square box on the stage. This is just letting you know where the box is located.</p>
<p>We should give our Button an ID as well so click on the Button and notice how the Flex Properties changed. It will change to give you the properties of the component you have selected. Now in the ID field name the button myBtn.</p>
<p>Now let’s make something happen.  If you click on the button component on the stage you will notice in the Flex Properties tab that there is an On click field. This is where we need to enter a little code to make the button work and display our text.</p>
<p>So click inside the On click input field and type:  txtBox.text=&#8217;hello world&#8217;.  This is the text that will show up in the text box when we click on the button.</p>
<p>The code is layout like this: txtBox (is the name of the text component that is on the stage and we named it txtBox), now the .text is telling the MXML tag to put the text or string that follows the .text  in the component named txtBox . To do this the .text must have an = sign and a single quote followed by your text and closed with a single quote.</p>
<p>The single quotes need to be used because the On click function uses double quotes and you can never combine the two.</p>
<p>Now we are ready to test the application. So press the F11 key(pc) or command F11(mac) to test the application. When you do press the key this will open up your browser and your button should be on the stage.</p>
<p>If you click on the button your text Hello World should appear in the middle of the stage.</p>
<p>The first time you run a program you might have a problem with the program saying that your Flash Player is not the debugger version. If this is the case follow the link and download the debugger version for your operating system and then it should run just fine.</p>
<p>Congrats you just finished your first Flex project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.tweenout.com/flex-and-the-interface-part-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
