<?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>blog.betabong.com &#187; Flex</title>
	<atom:link href="http://blog.betabong.com/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.betabong.com</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 10:45:13 +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>Develop in Flex Builder, publish in Flash IDE (Mac OS X)</title>
		<link>http://blog.betabong.com/2008/11/29/flex-builder-t-flash-ide/</link>
		<comments>http://blog.betabong.com/2008/11/29/flex-builder-t-flash-ide/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 12:12:43 +0000</pubDate>
		<dc:creator>betabong</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[CS4]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Install]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=144</guid>
		<description><![CDATA[<p><span class="update"><strong>Update:</strong> <a href="http://blog.betabong.com/2008/12/03/test-movie-from-flex-to-flash-easy-way/">I&#8217;ve found an easier way without FlashCommand</a></span></p>
<p>Once you got used to developing for Flash in Flex Builder, you hate to do any programming in Flash IDE. Still you sometimes might have to: Flex Builder won&#8217;t allow to&#8230; <a href="http://blog.betabong.com/2008/11/29/flex-builder-t-flash-ide/" class="read_more">Read more</a></p>
Related posts:<ol>
<li><a href='http://blog.betabong.com/2008/12/03/test-movie-from-flex-to-flash-easy-way/' rel='bookmark' title='Test Movie from Flex to Flash (easy way)'>Test Movie from Flex to Flash (easy way)</a></li>
<li><a href='http://blog.betabong.com/2008/12/06/test-flex-throttled-simulate-download/' rel='bookmark' title='Test Flex/Flash throttled (aka Simulate Download)'>Test Flex/Flash throttled (aka Simulate Download)</a></li>
<li><a href='http://blog.betabong.com/2008/07/16/flex-project-svn-strategy/' rel='bookmark' title='Flex Project &#8211; SVN Strategy'>Flex Project &#8211; SVN Strategy</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><span class="update"><strong>Update:</strong> <a href="http://blog.betabong.com/2008/12/03/test-movie-from-flex-to-flash-easy-way/">I&#8217;ve found an easier way without FlashCommand</a></span></p>
<p>Once you got used to developing for Flash in Flex Builder, you hate to do any programming in Flash IDE. Still you sometimes might have to: Flex Builder won&#8217;t allow to publish into a FLA file. (There are of course many other reasons, like supporting older AS1/AS2 projects, we don&#8217;t go into that here.) Thanks to Eclipse&#8217;s ability to be customized, there are ways to make things at least a little easier. I give here a little overview of how I&#8217;ve set up my environment, based on several helpful resources I&#8217;ve found in the web.</p>
<ol>
<li>Install FlashCommand</li>
<li>Install Ant</li>
</ol>
<p>And for each project:</p>
<ol>
<li>Create/modify Ant file</li>
<li>Create Actionscript project</li>
<li>Set up project and FLA file</li>
</ol>
<p><span id="more-144"></span></p>
<h3>What you need</h3>
<ul>
<li><a href="http://www.adobe.com/products/flex/">Flex Builder</a></li>
<li><a href="http://www.adobe.com/products/flash/">Flash IDE (CS3 or CS4)</a></li>
</ul>
<h3>Install FlashCommand</h3>
<p><a href="http://www.mikechambers.com/blog/2008/05/02/flashcommand-for-os-x-updated-to-work-with-flash-cs3/">flashcommand</a> is a python script by <a href="http://www.mikechambers.com/blog/">Mike Chambers</a> that lets you compile FLA files from the command line using Flash IDE. <a href="http://code.google.com/p/flashcommand/downloads/list">Download it</a> and put it wherever you want.</p>
<h3>Install ANT</h3>
<p>If you&#8217;re used to FDT (or Eclipse in any way) you may well know Ant. <a href="http://en.wikipedia.org/wiki/Apache_Ant">Ant</a> is the premier build tool for any developers working in <a href="http://www.eclipse.org/">Eclipse</a>, with many many cool possibilites to automate your workflow. Here&#8217;s how you <a href="http://blog.jodybrewster.net/2008/04/09/installing-ant-in-flex-builder-3/">install Ant in Flex Builder 3 Standalone</a>:</p>
<ol>
<li>Go to Help &gt; Software Updates &gt; Find and Install</li>
<li>Search for new features to install, click next</li>
<li>Select «The Eclipse Project Updates», click finish<br />
Note: If you do not have the option above click «New Remote Site» and enter «The Eclipse Project Updates» as the name and «http://update.eclipse.org/updates/3.3» as the url.</li>
<li>In Eclipse project updates look for «Eclipse Java Development Tools &#8230;» – it might be in «Eclipse SDK Eclipse 3.3.2» but this depends on what version you have installed and what version is currently available. Select it and click next.</li>
<li>Accept licence agreement, click next. Then click «Finish» to start download.</li>
<li>Once downloaded, click «Install all»</li>
<li>Restart Eclipse (you&#8217;ll be asked to)</li>
</ol>
<h3>Create Project</h3>
<ol>
<li>Create a new Actionscript Project in Flex Builder</li>
<li>Add a new «build» directory in the project root</li>
<li>Add your FLA file(s) and assets to the build folder and your source files to the src folder<br />
(I also strongly recommend adding external libraries to and «externals» directory and use svn:externals property on it, but that&#8217;s another story) </li>
<li>Add build paths. You have to do this at least twice:
<ul>
<li>In the Flash IDE for the FLA: Publish Settings &gt; Actionscript 3 «Settings&#8230;». Don&#8217;t forget to add the src folder at least.<br />
Test your FLA once done. It should compile just fine.</li>
<li>In Flex Builder: Project &gt; Properties &gt; ActionScript Build Path. Add your external libraries here. This is used so Flex knows where to lookup your classes, it won&#8217;t actually be needed for compiling, because that&#8217;s what Flash IDE&#8217;s gonna do.</li>
</ul>
</li>
<li>Now you&#8217;re almost done: you can edit your classes in Flex Builder and switch to Flash IDE to publish and/or test your movie. We&#8217;re gonna make this a little more comfortable with Ant and flashcommand.</li>
</ol>
<h3>Add Ant build file</h3>
<ol>
<li>Create a new file build.xml in the root folder and open it with Ant Editor (in Flex Builder aka Eclipse)</li>
<li>Edit the build.xml according your setup (see below for example)</li>
<li>Add build.xml to Ant View (Window &gt; Other Views&#8230;)</li>
<li>Run an action by double clicking it in Ant View: there you go!! It will compile in Flash IDE and open in your browser for testing!</li>
</ol>
<h3>Sample Ant build.xml</h3>

<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;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- ====================================================================== </span>
<span style="color: #808080; font-style: italic;">	     Nov 28, 2008 1:37:54 AM                                                        </span>
&nbsp;
<span style="color: #808080; font-style: italic;">	     MyProject    </span>
<span style="color: #808080; font-style: italic;">	     Compile in Flash IDE</span>
&nbsp;
<span style="color: #808080; font-style: italic;">	     sev                                                                </span>
<span style="color: #808080; font-style: italic;">	     ====================================================================== --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;MyProject&quot;</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;Compile and Run&quot;</span> <span style="color: #000066;">basedir</span>=<span style="color: #ff0000;">&quot;./&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	        <span style="color: #808080; font-style: italic;">&lt;!-- project specifics --&gt;</span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;browser&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;Safari&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;swf.filename&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;MyProject&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;html.filename&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;fla/index.html&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
	        <span style="color: #808080; font-style: italic;">&lt;!-- Flash IDE Commandline compiler --&gt;</span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;python&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;/usr/bin/python&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;flash.command&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;/path/to/flashcommand&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
	        <span style="color: #808080; font-style: italic;">&lt;!-- directories --&gt;</span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;user.path&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;/Users/yourname&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;build.dir&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${basedir}/build&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;main.fla&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${build.dir}/${swf.filename}.fla&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	        <span style="color: #808080; font-style: italic;">&lt;!-- paths --&gt;</span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;output.path&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${build.dir}/${swf.filename}.swf&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
			<span style="color: #808080; font-style: italic;">&lt;!-- you can also point to the file:///path/to/index.html --&gt;</span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;local.path&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;http://localhost/projects/MyProject/${html.filename}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;log.path&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${user.path}/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
	        <span style="color: #808080; font-style: italic;">&lt;!-- Compile python flashcommand -e  -s build/MyProject.fla -o build/MyProject.swf </span>
&nbsp;
<span style="color: #808080; font-style: italic;">	        usage: flashcommand -e | -c | -p [-v] [-x] (-s &lt;sourcefile&gt;) ([-o] &lt;exportpath&gt;) ([-t] &lt;timeout&gt;)([-d] &lt;tempdir&gt;) [-j]</span>
&nbsp;
<span style="color: #808080; font-style: italic;">	        Options and arguments:</span>
&nbsp;
<span style="color: #808080; font-style: italic;">	        -a : Prints version and about information.</span>
<span style="color: #808080; font-style: italic;">	        -c : Specifies save and compact action. </span>
<span style="color: #808080; font-style: italic;">	        -d : Specifies temp directory that will be used for temporary files. Optional.</span>
<span style="color: #808080; font-style: italic;">	        -e : Specifies export action.</span>
<span style="color: #808080; font-style: italic;">	        -h : Prints usage information.</span>
<span style="color: #808080; font-style: italic;">	        -j : Specifies that the generated JSFL file should be printed. If this option is specified, Flash will not be executed.</span>
<span style="color: #808080; font-style: italic;">	        -o : Specifies the output file if -e flag is also set. Optional. If not specified, file will be output to same directory as source.</span>
<span style="color: #808080; font-style: italic;">	        -p : Specifies publish action.</span>
<span style="color: #808080; font-style: italic;">	        -s : Specifies source file. Required.</span>
<span style="color: #808080; font-style: italic;">	        -t : Specifies timeout value. Optional.</span>
<span style="color: #808080; font-style: italic;">	        -v : Specifies verbose mode. Optional.</span>
<span style="color: #808080; font-style: italic;">	        -f : Specifies that the Flash authoring version installed is a version other than Flash CS3</span>
<span style="color: #808080; font-style: italic;">	        -x : Specifies whether Flash should be closed after it is done processing. Optional.    </span>
&nbsp;
<span style="color: #808080; font-style: italic;">	        --&gt;</span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Compile and Run&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;antcall</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;Compile in IDE&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;antcall</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;Clear Log&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;antcall</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;Open in Browser&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Compile in IDE&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${flash.command} -e -c -s ${main.fla} -o ${output.path}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exec</span> <span style="color: #000066;">executable</span>=<span style="color: #ff0000;">&quot;${python}&quot;</span> <span style="color: #000066;">failonerror</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">logError</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;${flash.command}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-e &quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-s ${main.fla} &quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-o ${output.path}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exec<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
&nbsp;
        <span style="color: #808080; font-style: italic;">&lt;!-- Open in local browser --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Open in Browser&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exec</span> <span style="color: #000066;">executable</span>=<span style="color: #ff0000;">&quot;open&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-a ${browser} ${local.path}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exec<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #808080; font-style: italic;">&lt;!-- Clear Debug Log --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Clear Log&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
        	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;concat</span> <span style="color: #000066;">destfile</span>=<span style="color: #ff0000;">&quot;${log.path}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>                                                                                                            
.: Sev Log File :.
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/concat<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exec</span> <span style="color: #000066;">executable</span>=<span style="color: #ff0000;">&quot;open&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-a console '${log.path}'&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exec<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><strong>Update:</strong> <a href="http://www.leebrimelow.com/">Lee Brimelov</a> just released a <a href="http://theflashblog.com/?p=482">plugin for Eclipse</a>, that provides this functionality (more or less) with a single click of an icon. It&#8217;s an alpha version, and you won&#8217;t have all the Ant flexibility (well, you could still install Ant), but you can avoid most of the installation hazzle, and that&#8217;s pretty cool. Unfortunately I couldn&#8217;t get it to work so far. </p>
<p><strong>Update 2:</strong> It bugged me that every time I execute this action Flash would pop up. To work around that I slightly modified the FlashCommand script (it actually checks wether the FLA file is already open, and if so won&#8217;t call the open command). Also I had to leave away the -c option (save and compact), something I don&#8217;t need anyway. So now when you execute the command from Flex the following happens:</p>
<ol>
<li>The little publish dialog pops up (Fla is exported to SWF)</li>
<li>The HTML file is opened in the browser (which comes to front), as well as the Console displaying the trace output</li>
</ol>
<p>Also I have bound the «Launch last external tool» command in Flex Builder to a key combo. Now things run pretty smooth and as much satisfying as compiling via Flash can be. Btw, I also looked into this Eclipse plugin – as it seems the only thing it does is to tell Flash to «Test Movie» with the frontmost open document. That&#8217;s absolutely okay for most people, but I&#8217;m glad for the extra functionality I get with this solution (at the cost of more initial effort of course). Download here the modified FlashCommand: <a class="download" href='http://blog.betabong.com/wp-content/uploads/2008/12/flashcommand.zip'>flashcommand.zip</a></p>
<p>Related posts:<ol>
<li><a href='http://blog.betabong.com/2008/12/03/test-movie-from-flex-to-flash-easy-way/' rel='bookmark' title='Test Movie from Flex to Flash (easy way)'>Test Movie from Flex to Flash (easy way)</a></li>
<li><a href='http://blog.betabong.com/2008/12/06/test-flex-throttled-simulate-download/' rel='bookmark' title='Test Flex/Flash throttled (aka Simulate Download)'>Test Flex/Flash throttled (aka Simulate Download)</a></li>
<li><a href='http://blog.betabong.com/2008/07/16/flex-project-svn-strategy/' rel='bookmark' title='Flex Project &#8211; SVN Strategy'>Flex Project &#8211; SVN Strategy</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2008/11/29/flex-builder-t-flash-ide/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flex Project &#8211; SVN Strategy</title>
		<link>http://blog.betabong.com/2008/07/16/flex-project-svn-strategy/</link>
		<comments>http://blog.betabong.com/2008/07/16/flex-project-svn-strategy/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 10:35:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frontend]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=13</guid>
		<description><![CDATA[<p>I like to keep all my projects on a svn server. So far this was just for myself and I didn&#8217;t care much about the simplicity of checking out and in – a little chaos is acceptable if you&#8217;re up&#8230; <a href="http://blog.betabong.com/2008/07/16/flex-project-svn-strategy/" class="read_more">Read more</a></p>
Related posts:<ol>
<li><a href='http://blog.betabong.com/2008/12/03/test-movie-from-flex-to-flash-easy-way/' rel='bookmark' title='Test Movie from Flex to Flash (easy way)'>Test Movie from Flex to Flash (easy way)</a></li>
<li><a href='http://blog.betabong.com/2008/11/29/flex-builder-t-flash-ide/' rel='bookmark' title='Develop in Flex Builder, publish in Flash IDE (Mac OS X)'>Develop in Flex Builder, publish in Flash IDE (Mac OS X)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I like to keep all my projects on a svn server. So far this was just for myself and I didn&#8217;t care much about the simplicity of checking out and in – a little chaos is acceptable if you&#8217;re up to handle it ;)</p>
<p>Finally I was forced to rethink this strategy because I wanted to let other people work on a project. As many actionscript projects, this one also heavily relies on external libraries, most of them hosted by Google Code, another one being my own (closed) lib. So should I tell people: «hey, just svn checkout from here and there and then relink the libs in the project properties but don&#8217;t check in the updated settings for christ&#8217;s sake!»No. Too shaky, really.</p>
<p>Fortunately, SVN provides a fucking cool way to solve this issue: svn:externals. <span id="more-13"></span>Ha! This is so awesome, you won&#8217;t believe it ;-) Okay, here are the steps to follow (on a mac at least):</p>
<p>Create a flex project:</p>
<ul>
<li>project
<ul>
<li>html-template</li>
<li>src</li>
</ul>
</li>
</ul>
<p>Add a new directory:</p>
<ul>
<li>project
<ul>
<li>html-template</li>
<li>src</li>
<li>externals</li>
</ul>
</li>
</ul>
<p>Now put this on your svn, either by svn add or by putting in the repos and checking out again (well.. just as you did). If you&#8217;ve already got bin-debug or bin-release directories, just remove them on the repos and svn update (they are created with each publish in flex).</p>
<p>Now let&#8217;s say our project resides in ~/Documents/projects/project (path to project). Do the following in Terminal:</p>
<pre>cd ~/Documents/projects/project/externals
svn svn propedit svn:externals .</pre>
<p>This should open an editor (in my case I&#8217;ve defined textmate as my editor by doing:)</p>
<pre>export EDITOR='mate -w'</pre>
<p>Enter the following (example libraries):</p>
<pre>caurinatweener http://tweener.googlecode.com/svn/trunk/as3/
as3corelib http://as3corelib.googlecode.com/svn/</pre>
<p>You can also add a specific release:</p>
<pre>caurinatweener -r23 http://tweener.googlecode.com/svn/trunk/as3/</pre>
<p>(in TextMate save and close, if you use vim you know what to do anyway)</p>
<p>Now comes the magic part:</p>
<pre>svn up</pre>
<p>This will checkout all defined libraries into externals/xyz!! you do <code>svn commit</code> and now every time somebody checks out your project (or your externals directory) all the libs will be checked out automatically! I think this is just fucking awesome! :-)</p>
<p>Now in Eclipse all paths to your external libraries will be relative to the project (of course you have to add the libs there or change the paths – you should know how to do that ;))</p>
<p>Now all we need to is ignoring bin-release and bin-debug. We don&#8217;t want these directories to be in our svn repos:</p>
<pre>cd ~/Documents/projects/project
svn svn propedit svn:ignore .</pre>
<p>enter a list of directories or files to be ignored. in our case:</p>
<pre>bin-debug
bin-release</pre>
<p>That&#8217;s it! Thanks, svn!</p>
<p>Related posts:<ol>
<li><a href='http://blog.betabong.com/2008/12/03/test-movie-from-flex-to-flash-easy-way/' rel='bookmark' title='Test Movie from Flex to Flash (easy way)'>Test Movie from Flex to Flash (easy way)</a></li>
<li><a href='http://blog.betabong.com/2008/11/29/flex-builder-t-flash-ide/' rel='bookmark' title='Develop in Flex Builder, publish in Flash IDE (Mac OS X)'>Develop in Flex Builder, publish in Flash IDE (Mac OS X)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2008/07/16/flex-project-svn-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: blog.betabong.com @ 2012-02-05 05:44:15 -->
