<?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>theDeSilva.com&#187; Flex</title>
	<atom:link href="http://www.thedesilva.com/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thedesilva.com</link>
	<description>Andrew de Silva</description>
	<lastBuildDate>Tue, 26 Apr 2011 20:24:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Embeding Collada files on Flex</title>
		<link>http://www.thedesilva.com/2009/08/embeding-collada-files-on-flex/</link>
		<comments>http://www.thedesilva.com/2009/08/embeding-collada-files-on-flex/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 16:11:49 +0000</pubDate>
		<dc:creator>Andrew de Silva</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[embed collada]]></category>
		<category><![CDATA[mimetype]]></category>

		<guid isPermaLink="false">http://www.thedesilva.com/?p=163</guid>
		<description><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/>Here&#8217;s how to embed collada files into your Flex. 1 2 3 4 5 6 7 &#160; &#91;Embed&#40;source=&#34;collada.dae&#34;, mimeType=&#34;application/octet-stream&#34;&#41;&#93; private var Model3D:Class; var byteArray:ByteArray = new Model3D&#40;&#41;; var collada:DAE = new DAE&#40;&#41;; collada.load&#40;byteArray, material&#41;; scene.addChild&#40;collada&#41;;]]></description>
			<content:encoded><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/><p>Here&#8217;s how to embed collada files into your Flex.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;">&nbsp;
<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;collada.dae&quot;</span>, mimeType=<span style="color: #ff0000;">&quot;application/octet-stream&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> Model3D:<span style="color: #000000; font-weight: bold;">Class</span>;
<span style="color: #000000; font-weight: bold;">var</span> byteArray:ByteArray = <span style="color: #000000; font-weight: bold;">new</span> Model3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> collada:DAE = <span style="color: #000000; font-weight: bold;">new</span> DAE<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
collada.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>byteArray, material<span style="color: #66cc66;">&#41;</span>;
scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>collada<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.thedesilva.com/2009/08/embeding-collada-files-on-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Hand Cursor for Flex Component</title>
		<link>http://www.thedesilva.com/2009/04/creating-hand-cursor-for-flex-component/</link>
		<comments>http://www.thedesilva.com/2009/04/creating-hand-cursor-for-flex-component/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 20:48:16 +0000</pubDate>
		<dc:creator>Andrew de Silva</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[hand cursor]]></category>
		<category><![CDATA[mouse cursor]]></category>

		<guid isPermaLink="false">http://www.thedesilva.com/?p=140</guid>
		<description><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/>In order to change the mouse cursor to a hand cursor when a mouse over a particular component in Flex Component you will need to set useHandCursor = true , however if you set this to true you will not be able to get the hand cursor unless you set another two properties on the [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/><p>In order to change the mouse cursor to a hand cursor when a mouse over a particular component in Flex Component you will need to set useHandCursor = true , however if you set this to true you will not be able to get the hand cursor unless you set another two properties on the Flex component , buttonMode = true and mouseChildren = false. </p>
<p>Here&#8217;s an example</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> label:Label = <span style="color: #000000; font-weight: bold;">new</span> Label<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
label.<span style="color: #006600;">buttonMode</span> = <span style="color: #000000; font-weight: bold;">true</span>;
label.<span style="color: #0066CC;">useHandCursor</span> = <span style="color: #000000; font-weight: bold;">true</span>;
label.<span style="color: #006600;">mouseChildren</span> = <span style="color: #000000; font-weight: bold;">false</span>;</pre></td></tr></table></div>

<p>Once you set all three property of the component you will have the hand cursor when the mouse moves over the flex component.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedesilva.com/2009/04/creating-hand-cursor-for-flex-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tour de FLEX</title>
		<link>http://www.thedesilva.com/2008/11/tour-de-flex/</link>
		<comments>http://www.thedesilva.com/2008/11/tour-de-flex/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 17:01:26 +0000</pubDate>
		<dc:creator>Andrew de Silva</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[flex components]]></category>
		<category><![CDATA[tour de flex]]></category>
		<category><![CDATA[tour de flex plugin]]></category>

		<guid isPermaLink="false">http://www.thedesilva.com/?p=105</guid>
		<description><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/>Here&#8217;s a really cool Flex learning tool called Tour de Flex. Tour de Flex is a desktop application for exploring Flex capabilities and resources, including the core Flex components, Adobe AIR and data integration, as well as a variety of third-party components, effects, skins, and more. It&#8217;s a really great application as it provides alot [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/><p>Here&#8217;s a really cool Flex learning tool called Tour de Flex. Tour de Flex is a desktop application for exploring Flex capabilities and resources, including the core Flex components, Adobe AIR and data integration, as well as a variety of third-party components, effects, skins, and more.</p>
<p>It&#8217;s a really great application as it provides alot of examples with source code that will allow you to learn and also visualize the changes.  Below is a screenshot of Tour de FLEX Air Application</p>
<div id="attachment_106" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.thedesilva.com/wp-content/uploads/2008/11/tour_de_flex_air.png"><img class="size-medium wp-image-106" title="tour_de_flex_air" src="http://www.thedesilva.com/wp-content/uploads/2008/11/tour_de_flex_air-300x232.png" alt="Tour de FLEX Air Screen Short" width="300" height="232" /></a><p class="wp-caption-text">Tour de FLEX Air Screen Shot</p></div>
<p><span id="more-105"></span></p>
<p>The application is also available as a plugin to Flex Builder and Eclipse .  Once installed you can search by component name, tag or author and double-click any item in the results to immediately see the component in Tour de Flex.  The plugin provides a search interface to the 200+ samples in Tour de Flex . It&#8217;s pretty simple to install it on Flex Builder 3 . Here are the instructions to install it in Flex Builder</p>
<ol>
<li>Click on Help -&gt; Software Updates -&gt; Find and Install</li>
<li>Click on Search for New Feature to Install</li>
<li>Click on New Remote Site and enter <strong>http://tourdeflex.adobe.com/eclipse</strong> on the URL</li>
<li>You can type anything you want for the Name of the Remote Site. In my case I just put it as Adobe</li>
<div id="attachment_109" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.thedesilva.com/wp-content/uploads/2008/11/add_new_feature1.png"><img class="size-medium wp-image-109" title="Adding Tour de Flex to Flex Builder 3" src="http://www.thedesilva.com/wp-content/uploads/2008/11/add_new_feature1-300x278.png" alt="Adding Tour de Flex to Flex Builder 3" width="300" height="278" /></a><p class="wp-caption-text">Adding Tour de Flex to Flex Builder 3</p></div>
<li>Click OK and then click Finish</li>
<li>You will be presented with a list of new features that you can install , Select Tour de Flex and click Finish</li>
<li>Once installed, a new Tour de Flex view is available to add.</li>
<li>If you can&#8217;t find the Tour de Flex view on the Window preferences up top of your Flex Builder options then it could be hidden.  If that&#8217;s the case then follow on to the next step</li>
<li>Click Windows -&gt; Other View -&gt; Tour de Flex and you should be able to view the Tour de Flex Window which looks like below
<p><div id="attachment_110" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.thedesilva.com/wp-content/uploads/2008/11/eclipse-plugin-screenshot.png"><img class="size-medium wp-image-110" title="Tour de Flex Eclipse Plugin Screenshot" src="http://www.thedesilva.com/wp-content/uploads/2008/11/eclipse-plugin-screenshot-300x136.png" alt="Tour de Flex Eclipse Plugin Screenshot" width="300" height="136" /></a><p class="wp-caption-text">Tour de Flex Eclipse Plugin Screenshot</p></div></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.thedesilva.com/2008/11/tour-de-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash 10 File Reference</title>
		<link>http://www.thedesilva.com/2008/11/flash-10-file-reference/</link>
		<comments>http://www.thedesilva.com/2008/11/flash-10-file-reference/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 20:43:09 +0000</pubDate>
		<dc:creator>Andrew de Silva</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[fileReference]]></category>
		<category><![CDATA[flash player 10]]></category>

		<guid isPermaLink="false">http://www.thedesilva.com/?p=87</guid>
		<description><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/>Prior to Flash Player 10 , if you need to write or read a file to a user system , you would need to bounce it off a server and then load it back to the user system before you can even access the file. This is no longer true in Flash Player 10 . [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/><p>Prior to Flash Player 10 , if you need to write or read a file to a user system , you would need to bounce it off a server and then load it back to the user system before you can even access the file. This is no longer true in Flash Player 10 . The new API on FileReference class allows you to save and load file that is selected by the user , they are</p>
<p><strong>FileReference.load()</strong> &#8211; loads data from a file that is selected by the user</p>
<p><strong>FileReference.save()</strong> &#8211; save data to a file that is selected by the user</p>
<p>However , in order for the save() and load() to be called it need to be in response to a user interaction such as a button click and the location of the files cannot be exposed to Actionscript.</p>
<p><span id="more-87"></span></p>
<p>Below are the examples to use this new API</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">controls</span>.<span style="color: #0066CC;">Button</span>;
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">controls</span>.<span style="color: #006600;">TextArea</span>;
&nbsp;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">FileReference</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
&nbsp;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ByteArray</span>;
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> fileReference:FileReference;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> textArea:TextArea = <span style="color: #000000; font-weight: bold;">new</span> TextArea<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> loadButton:<span style="color: #0066CC;">Button</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Button</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> saveButton:<span style="color: #0066CC;">Button</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Button</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> myFilter:FileFilter = <span style="color: #000000; font-weight: bold;">new</span> FileFilter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Text&quot;</span>,<span style="color: #ff0000;">&quot;*.txt&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
	textArea.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">200</span>;
	textArea.<span style="color: #0066CC;">height</span> = <span style="color: #cc66cc;">200</span>;
	addChild<span style="color: #66cc66;">&#40;</span>textArea<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	saveButton.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Save&quot;</span>
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>saveButton<span style="color: #66cc66;">&#41;</span>;
	saveButton.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,saveFile<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	loadButton.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Upload Text File&quot;</span>
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>loadButton<span style="color: #66cc66;">&#41;</span>;
	loadButton.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,loadFile<span style="color: #66cc66;">&#41;</span>;	
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> saveFile<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
	fileReference = <span style="color: #000000; font-weight: bold;">new</span> FileReference<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	fileReference.<span style="color: #006600;">save</span><span style="color: #66cc66;">&#40;</span>textArea.<span style="color: #0066CC;">text</span>,<span style="color: #ff0000;">&quot;test.txt&quot;</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> loadFile<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
	fileReference = <span style="color: #000000; font-weight: bold;">new</span> FileReference<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	fileReference.<span style="color: #006600;">browse</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>myFilter<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
	fileReference.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">SELECT</span>,selectFile<span style="color: #66cc66;">&#41;</span>;
	fileReference.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>,loadText<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> selectFile<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
	fileReference.<span style="color: #0066CC;">load</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> loadText<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">data</span>:ByteArray = fileReference.<span style="color: #0066CC;">data</span>;
	textArea.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">data</span>.<span style="color: #006600;">readUTFBytes</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>.<span style="color: #006600;">bytesAvailable</span><span style="color: #66cc66;">&#41;</span>;
	fileReference = <span style="color: #000000; font-weight: bold;">null</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Of course you can also use Event Listeners to make sure that the file are properly loaded or if the user canceled the file browsing.</p>
<p>Here&#8217;s the working example</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_demo_1012762932"
			class="flashmovie"
			width="400"
			height="290">
	<param name="movie" value="http://www.thedesilva.com/wp-content/uploads/2008/11/demo.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.thedesilva.com/wp-content/uploads/2008/11/demo.swf"
			name="fm_demo_1012762932"
			width="400"
			height="290">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a title="Flash 10 File Reference" href="http://www.thedesilva.com/wp-content/uploads/2008/11/srcview/index.html" target="_blank">View Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedesilva.com/2008/11/flash-10-file-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Flex 4 sdk codename &#8216;Gumbo&#8217; in Flex Builder 3</title>
		<link>http://www.thedesilva.com/2008/10/using-flex-4-sdk-codename-gumbo-in-flex-builder-3/</link>
		<comments>http://www.thedesilva.com/2008/10/using-flex-4-sdk-codename-gumbo-in-flex-builder-3/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 20:46:49 +0000</pubDate>
		<dc:creator>Andrew de Silva</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Flex 4 SDK]]></category>
		<category><![CDATA[Flex Builder 3]]></category>
		<category><![CDATA[Gumbo]]></category>

		<guid isPermaLink="false">http://www.thedesilva.com/?p=75</guid>
		<description><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/>If you haven&#8217;t heard about the next version of Flex , code name Gumbo is now in development. According to Adobe&#8217;s Open Source site , the next version of Flex has 3 primary themes : Design in Mind: provide a framework meant for continuous collaboration between designer and developer. Developer Productivity: improve compiler performance and [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/><p>If you haven&#8217;t heard about the next version of Flex , code name Gumbo is now in development. According to Adobe&#8217;s Open Source site , the next version of Flex has 3 primary themes :</p>
<blockquote>
<ul>
<li><strong>Design in Mind</strong>: provide a framework meant for continuous collaboration between designer and developer.</li>
<li><strong>Developer Productivity</strong>: improve compiler performance and add productivity enhancements to language features like data binding</li>
<li><strong>Framework Evolution</strong>: take advantage of new Flash Player capabilities and add features required by common use-cases</li>
</ul>
</blockquote>
<p>Here&#8217;s instructions on how to use Gumbo SDK in your Flex Builder 3.</p>
<p><span id="more-75"></span></p>
<ol>
<li>First you will need to <a title="Flex Gumbo SDK Nightly Build" href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4/" target="_blank">download the lastest Gumbo SDK nightly build</a> from <a title="Flex 4 Gumbo " href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo" target="_blank">opensource.adobe.com</a>. Once you downloaded the zip file you will need to extract them to your hard drive.</li>
<li>You will also need Flash Player version 10 , download it from Adobe.com or click here for <a title="Get Flash Player 10" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash Player 10</a>.</li>
<li>Put the newly extracted folder in flex builders sdk directory , which would be in C:\Program Files\Adobe\Flex Builder 3\sdks ( this would be your default installation folder it will different if you changed it ).</li>
<li>Now we need to configure your Flex Builder 3 in order to use this SDK. Launch Flex Builder and then goto Window -&gt; Preference and you should see the window below.</li>
<div id="attachment_76" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.thedesilva.com/wp-content/uploads/2008/10/flex_builder_3_preference.jpg"><img class="size-full wp-image-76" title="Flex Builder 3 Preference Window" src="http://www.thedesilva.com/wp-content/uploads/2008/10/flex_builder_3_preference.jpg" alt="Flex Builder 3 Preference Window" width="500" height="330" /></a><p class="wp-caption-text">Flex Builder 3 Preference Window</p></div>
<li>Now click &#8220;Add&#8221; and browse into your Flex SDK directory and select the folder where your Flex Gumbo SDK is located and Flex Builder should be able to retrieve the SDK name by itself. Click the &#8220;OK&#8221; button. I would suggest keeping the old Flex 3 SDK as the default SDK and choose the Flex Gumbo SDK each time you need to use it.</li>
<li>Now that we have Flex Gumbo SDK availabe in your Flex Builder let&#8217;s create new project to use it. In Flex Builder 3 , click on &#8220;New Project&#8221; to create a new project and after the project is created goto the project properties by right clicking on the project in the Flex Navigator Tab and then click &#8220;Properties&#8221;. In the &#8220;Properties&#8221; dialog click on &#8220;Flex Compiler&#8221; and select &#8220;Use a specific SDK&#8221;  , here you should select the Gumbo SDK that you have installed as your sdk and change the &#8220;Require Flash Version&#8221; to 10.0.0.</li>
<div id="attachment_77" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.thedesilva.com/wp-content/uploads/2008/10/flex_builder_3_preference2.jpg"><img class="size-full wp-image-77" title="Flex Builder 3 Project Properties" src="http://www.thedesilva.com/wp-content/uploads/2008/10/flex_builder_3_preference2.jpg" alt="Flex Builder 3 Project Properties" width="500" height="434" /></a><p class="wp-caption-text">Flex Builder 3 Project Properties</p></div>
<li>That&#8217;s it , you should now be able to debug/compile your Flex project with Flex Gumbo SDK with Flash 10 features.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.thedesilva.com/2008/10/using-flex-4-sdk-codename-gumbo-in-flex-builder-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Width and Height for Dynamic Image in Flex</title>
		<link>http://www.thedesilva.com/2008/07/width-and-height-for-dynamic-image/</link>
		<comments>http://www.thedesilva.com/2008/07/width-and-height-for-dynamic-image/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 22:03:42 +0000</pubDate>
		<dc:creator>Andrew de Silva</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[dynamic image]]></category>
		<category><![CDATA[Height]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Width]]></category>

		<guid isPermaLink="false">http://www.thedesilva.com/?p=38</guid>
		<description><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flash_small.png" width="32" height="32" alt="" title="Flash" /><img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/>Recently I was working on a Flex project and realize upon having my project on the live server , I couldn&#8217;t retrieve the height and width property of my loaded image by doing below var img:Image = new Image&#40;&#41;; img.source = &#34;image.jpg&#34; trace&#40;img.height&#41;; trace&#40;img.width&#41;; The trace statement above will just show 0 for both width [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flash_small.png" width="32" height="32" alt="" title="Flash" /><img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/><p>Recently I was working on a Flex project and realize upon having my project on the live server , I couldn&#8217;t retrieve the height and width property of my loaded image by doing below</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> img:Image = <span style="color: #000000; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img.<span style="color: #006600;">source</span> = <span style="color: #ff0000;">&quot;image.jpg&quot;</span>
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>img.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>img.<span style="color: #0066CC;">width</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>The trace statement above will just show 0 for both width and height. Of course after a few hours of searching Google for a solution I realized on the livedocs documentation for Image has the property contentWidth and contentHeight which provides the height and width of the image loaded.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> img:Image = <span style="color: #000000; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img.<span style="color: #006600;">source</span> = <span style="color: #ff0000;">&quot;image.jpg&quot;</span>
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>img.<span style="color: #006600;">contentHeight</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>img.<span style="color: #006600;">contentWidth</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.thedesilva.com/2008/07/width-and-height-for-dynamic-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

