PDA

View Full Version : Refactor project type in FB?


wvxvw
04-24-2009, 10:34 PM
This should be something simple... I just cannot figure out where would this option could be...
What I want to do:
I have files A.mxml and B.as I want to change the compile target from A.mxml to B.as... for whatever reason FB wouldn't let me do it... (it would only list *.mxml files as available targets... no AS files... :eek:

MichaelxxOA
04-24-2009, 11:07 PM
Not ideal, but you can manually change the properties of the project.

I did this with a Flex Project called Test. Fill in the steps with your own project.

- Close Flex Builder
- Navigate to the directory containing the Test Project's files (bin-debug, html template, etc.)
- In this directory there is a hidden file called .actionScriptProperties. Make the following changes:

I marked the changes with <!-- old (the new tags are just below these old tags)


<?xml version="1.0" encoding="UTF-8"?>
<!-- old <actionScriptProperties mainApplicationPath="Test.mxml" version="3"> -->
<actionScriptProperties mainApplicationPath="NewTest.as" version="3">
<compiler additionalCompilerArguments="-locale en_US" copyDependentFiles="true" enableModuleDebug="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersion="9.0.124" htmlPlayerVersionCheck="true" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="1">
<libraryPathEntry kind="4" path=""/>
<libraryPathEntry kind="1" linkType="1" path="libs"/>
</libraryPath>
<sourceAttachmentPath/>
</compiler>
<applications>
<!-- old <application path="Test.mxml"/> -->
<application path="NewTest.as"/>
</applications>
<modules/>
<buildCSSFiles/>
</actionScriptProperties>


Not sure if that helps. Good luck man!

wvxvw
04-25-2009, 01:29 AM
Unfortunately I'm on FB4 and the project files look different now, but I'll try to figure that out... thanks for the hint anyway.
Will post back if I find a way.

UPD: Nope... Ant freaks out if I change the project type like this... more precisely, firstly I'm getting RTE from Java:
Save Failed
com.adobe.flexide.mxml.core.document.MXMLDocument
And then Ant fails to generate HTMLs from templates... (doesn't even get to compiling SWF) hm...