<?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>Webmasterwords &#187; Flex</title>
	<atom:link href="http://www.webmasterwords.com/category/adobe-flex/feed" rel="self" type="application/rss+xml" />
	<link>http://www.webmasterwords.com</link>
	<description>Useful snippets for Webmasters</description>
	<lastBuildDate>Wed, 21 Sep 2011 15:55:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Flex on Linux &#8211; Hello World Example</title>
		<link>http://www.webmasterwords.com/flex-developement-on-linux-hello-world-example?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flex-developement-on-linux-hello-world-example</link>
		<comments>http://www.webmasterwords.com/flex-developement-on-linux-hello-world-example#comments</comments>
		<pubDate>Sat, 20 Dec 2008 12:51:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.webmasterwords.com/flex-developement-on-linux-hello-world-example</guid>
		<description><![CDATA[Now that adobe have improved Linux support for the flash player (including 64-bit systems) and released the open source flex SDK, its now relatively easy to develop fully fledged flex applications on your Linux machine. This post is designed to be an introduction to get you up and running on flex, more posts will follow with examples from a flex + python + sqllite application that I'm current building using]]></description>
			<content:encoded><![CDATA[<p>Now that adobe have improved Linux support for the flash player (including 64-bit systems) and released the open source flex SDK, its now relatively easy to develop fully fledged flex applications on your Linux machine. This post is designed to be an introduction to get you up and running on flex, more posts will follow with examples from a flex + python + sqllite application that I&#8217;m current building using a Linux developement enviroment (Ubuntu / Fedora 64-bit).</p>
<p>First things first you&#8217;ll need to get the flex SDK from adobe.com. For some reason Abobe are keen to persuade everyone to do this via their flex builder free 60 day trial. You do not need flex builder to build flex apps, although I&#8217;ve played with it and it seems to be fairly well conceived tool i&#8217;m not a fan of developing in an application that&#8217;ll ill have to pay for after 60 days, thats not really the open source way. So just grab the Flex SDK from:</p>
<p><a href="http://www.adobe.com/products/flex/flexdownloads/index.html#sdk">Adobe Flex SDK (118MB)</a></p>
<p>You&#8217;ll also require the Sun Java Developement Kit (JDK). Please note &#8211; <strong>it will not work with the native GIJ compiler on Ubuntu.</strong> You can JDK 6 from</p>
<p><a href="https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u11-oth-JPR@CDS-CDS_Developer">Sun Java 6 JDK</a></p>
<p>You&#8217;ll need to extract each archive into a directory (in this example use /opt/) Once extacted the two SDKs needed to be added to the PATH. Because flex won&#8217;t work with the native GIJ the reference to the Sun JDK needs to occur before the location of GIJ in the PATH. On my system the following export shell/terminal command works fine:</p>
<p><strong>export PATH=&#8221;/opt/java/jdk1.6.0_10/bin:/opt/flex/bin:$PATH&#8221;</strong></p>
<p>To make sure its worked run java -v in the terminal. This should report the Sun Java version.</p>
<p>This command will need to be run once for each new shell session when you wish to develope in flex. To do this automatically you can added it to your users .profile file.</p>
<p>Test you setup by downloading my very simple <a href="http://www.webmasterwords.com/helloworld.mxml" title="hello world">hello world flex script</a></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Application</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> <span style="color: #000066;">creationComplete</span>=<span style="color: #ff0000;">&quot;start();&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #339933;">&lt;![CDATA[</span>
<span style="color: #339933;">        import mx.controls.Alert;</span>
&nbsp;
<span style="color: #339933;">        public function start():void {</span>
<span style="color: #339933;">            Alert.show('Hello World, this is flex on linux!');</span>
<span style="color: #339933;">        }</span>
<span style="color: #339933;">        ]]&gt;</span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Run the flex compiler at the command line:</p>
<p><strong>mxmlc helloworld.mxml</strong></p>
<p>Test the generated swf in firefox</p>
<p><strong>firefox helloworld.swf</strong></p>
<p>hopefully you should see something like this &#8211; <a href="http://www.webmasterwords.com/helloworld.swf">Hello World Demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterwords.com/flex-developement-on-linux-hello-world-example/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

