<?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>hubflanger &#187; Flex SDK</title>
	<atom:link href="http://hubflanger.com/tag/flex-sdk/feed/" rel="self" type="application/rss+xml" />
	<link>http://hubflanger.com</link>
	<description>adventures in code</description>
	<lastBuildDate>Mon, 29 Mar 2010 22:41:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom:link rel='hub' href='http://hubflanger.com/?pushpress=hub'/>
		<item>
		<title>How to compile an AS3 Project with FDT</title>
		<link>http://hubflanger.com/how-to-compile-an-as3-project-with-fdt/</link>
		<comments>http://hubflanger.com/how-to-compile-an-as3-project-with-fdt/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 04:32:15 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[FDT]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex SDK]]></category>

		<guid isPermaLink="false">http://hubflanger.com/?p=38</guid>
		<description><![CDATA[Over the past couple of years, I&#8217;ve come to rely heavily on FDT for my Actionscript development work. An excellent plugin for the Eclipse IDE, FDT provides developers with a rich set of editing and refactoring tools unavailable in the Flash IDE. Back in the AS2 days, one can bypass the Flash IDE altogether and [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past couple of years, I&#8217;ve come to rely heavily on <a href="http://fdt.powerflasher.com/" target="_blank">FDT</a> for my Actionscript development work. An excellent plugin for the <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> IDE, FDT provides developers with a rich set of editing and refactoring tools unavailable in the Flash IDE. Back in the AS2 days, one can bypass the Flash IDE altogether and compile his or her SWF directly in FDT using the MTASC compiler. With the release of <a href="http://www.adobe.com/products/flex/features/flex_builder/" target="_blank">Flex Builder</a> 2 (and now 3), one can compile AS3 projects directly using the Flex SDK.</p>
<p>Now, if you&#8217;re a fan of <a href="http://fdt.powerflasher.com/" target="_blank">FDT</a>, there&#8217;s no need to worry that you need to switch over to <a href="http://www.adobe.com/products/flex/features/flex_builder/" target="_blank">Flex Builder</a> for your AS3 projects. The latest version of <a href="http://fdt.powerflasher.com/" target="_blank">FDT</a> (ver. 3), provides a way to compile your AS3 projects using the open source <a href="http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK" target="_blank">Flex SDK</a> via the <code>fcsh</code> script. Instructions for doing so are available on the <a href="http://fdt.powerflasher.com/forum/viewtopic.php?t=1679" target=_blank">FDT forums</a>. In this tutorial, I&#8217;m going to show you how to do so step-by-step. <span id="more-38"></span></p>
<h3>1. Downloading and Installing the Flex SDK</h3>
<ul>
<li>First you need to download and install a copy of the <a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email">Flex SDK</a> from Adobe.</li>
<li>Unzip the archive and place the folder in a directory where its path contains no space. In OSX, I recommend using <code>/usr/local/flex_sdk_3</code>. In Windows, you may use <code>C:\flex_sdk_3</code>.</li>
</ul>
<p>I also highly recommend creating a new Workspace for your AS3 projects if you haven&#8217;t done so already.</p>
<h3>2. Set up Eclipse/FDT Preferences</h3>
<ul>
<li>In Eclipse, open the <strong>Preferences</strong> panel.</li>
<li>In the <strong>FDT->Core Libraries</strong> settings, select the <strong>AS3 Core Libraries</strong> tab.</li>
<li>Click the <strong>Fast Add&#8230;</strong> button.</li>
<li>In the <strong>Type</strong> drop-down menu, select <strong>Pure AS3 (Flex 3)</strong> and for the <strong>Path</strong> field, browse to the directory where you installed the Flex SDK. In my case, I use <code>/usr/local/flex_sdk_3</code> (<a href="/wp-content/uploads/as3_flexsdk_fdt_figure1.jpg" target="_blank">figure 1</a>). Click <strong>OK</strong>.</li>
<li>Back in the <strong>Preferences</strong> panel, make sure the <strong>Pure_AS3_Flex_3_0</strong> core library is checked (<a href="/wp-content/uploads/as3_flexsdk_fdt_figure2.jpg" target="_blank">figure 2</a>). Click <strong>OK</strong> to exit the <strong>Preferences</strong> panel.</li>
</ul>
<h3>3. Creating a New AS3 Project</h3>
<ul>
<li>In the <strong>Flash Explorer</strong> panel, right-click and select <strong>New->New Flash Project</strong>.</li>
<li>In the <strong>New Project Wizard</strong>, make sure that in the <strong>Project Language</strong> settings, <strong>Action Script 3</strong> is selected and set to <strong>Pure_AS3_Flex_3_0</strong> in the drop-down menu (<a href="/wp-content/uploads/as3_flexsdk_fdt_figure3.jpg" target="_blank">figure 3</a>). Click <strong>Next</strong>.</li>
<li>In the next window (<a href="/wp-content/uploads/as3_flexsdk_fdt_figure4.jpg" target="_blank">figure 4</a>), you will see that your project is automatically linked to <strong>playerglobal.swc</strong> in the Core Library. This SWC contains the Flash core library classes that you would need in order to compile an AS3 application. Click <strong>Finish</strong>.</li>
<li>Next, create a source folder by right-clicking on your project and selecting <strong>New->Source Folder</strong>. Name this folder <code>src</code> and place it in the root of your project directory.</li>
<li>Create your application (document) class by right-clicking on your project and selecting <strong>New->Class</strong>. Name your file <code>MyApp.as</code> and make sure that it extends <code>flash.display.Sprite</code>. Click <strong>Finish</strong>.</li>
<li>Create a folder named <code>build</code> in the root of your project by right-clicking your project and selecting <strong>New->Folder</strong>. This will be the output folder for your SWF.</li>
<li>In my example, I&#8217;ve typed in some code to draw a 100&#215;100 red square graphic (<a href="/wp-content/uploads/as3_flexsdk_fdt_figure5.jpg" target="_blank">figure 5</a>).</li>
</ul>
<h3>4. Setting up your Run Configurations</h3>
<ul>
<li>Right-click on the <code>MyApp.as</code> file and select <strong>Run As->Run Configurations&#8230;</strong></li>
<li>In the <strong>Run</strong> panel, with <strong>FDT AS3 Application</strong> selected, click the <strong>New</strong> icon to create a new configuration for your build setup.</li>
<li>With the new configuration selected, in the <strong>Main</strong> tab, browse to your project <code>MyAS3Project</code> for the <strong>Project</strong> field, your class <code>src/MyApp.as</code> for the <strong>Main Class</strong> field and type in <code>build/MyApp.swf</code> for the <strong>Output</strong> field. Click <strong>Apply</strong> and then click <strong>Run</strong>. This will create a default SWF in the build folder (<a href="/wp-content/uploads/as3_flexsdk_fdt_figure6.jpg" target="_blank">figure 6</a>).</li>
<li>In the <strong>Start SWF</strong> tab, check the <strong>Start SWF after compilation</strong> box and browse to <code>build/MyApp.swf</code>. This will allow FDT to auto-launch your SWF in the built-in <strong>SWF Viewer</strong> once it&#8217;s compiled (<a href="/wp-content/uploads/as3_flexsdk_fdt_figure7.jpg" target="_blank">figure 7</a>). <strong>Close</strong> the <strong>Run</strong> panel.</li>
</ul>
<h3>5. Compiling your SWF</h3>
<ul>
<li>In the <strong>Flash Explorer</strong> panel, you may now compile your SWF by simply right-clicking on <code>MyApp.as</code> and selecting <strong>Run As->FDT AS3 Application</strong>.</li>
<li>Select the <strong>SWF Viewer</strong> tab and review your SWF (<a href="/wp-content/uploads/as3_flexsdk_fdt_figure8.jpg" target="_blank">figure 8</a>).</li>
</ul>
<p>Unlike Flex Builder, this build set up does not automatically create a html wrapper for your swf. You will have to create it yourself or use an ANT build script to automate that.</p>
<h2>Migrating Existing AS3 Projects</h2>
<p>If possible, change your Default Core Library to the Flex SDK as described in Section 2. This will globally set up your workspace to use the Flex SDK as the default compiler. If you do not wish to do so, you may still set it for each project by right-clicking your project and selecting <strong>Properties</strong>. Select <strong>FDT Source Folder</strong> and click the <strong>Change Core Library</strong> button to change the core library as you would in the <strong>Preferences</strong> panel (<a href="/wp-content/uploads/as3_flexsdk_fdt_figure9.jpg" target="_blank">figure 9</a>).</p>
<p>In addition to setting up your <strong>Run Configurations</strong> as mentioned above, also make sure that in the <strong>Flex SDK</strong> tab that the <strong>Use Default SDK</strong> radio button is checked and that its value is set to <strong>Pure_AS3_Flex_3_0</strong> (<a href="/wp-content/uploads/as3_flexsdk_fdt_figure10.jpg" target="_blank">figure 10</a>).</p>
<p>Good luck and happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/how-to-compile-an-as3-project-with-fdt/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>
