Home > Adobe, FlashDevelop, Flex > Setting up Projects in Flashdevelop – Part 2: Flex

Setting up Projects in Flashdevelop – Part 2: Flex

January 30th, 2010 , by Heeties - comments (0)

The previous part of this series handled in setting up Flashdevelop to build Flash Projects and can be found here. Now to get Flashdevelop working with Flex projects is almost the same so if you haven’t read part 1 yet, you should do that first.

You will need:
1. Flashdevelop:

You can download the newest release here. But unfortunately it’s currently only available for Windows users. There is a tutorial here to get it running on a mac thru parallels. In this tutorial I’m using Flashdevelop 3.0.6 RTM

2. Flex SDK
I used 3.5 for this tutorial, download here.

3. Flash player 10 projector content debugger
Download here. (After you download it , just run it once and close it again , that’s basically all you need to do with it)

Just extract the Flex SDK in a location you want for it. Please note that to compile a project in FlashDevelop

After you installed FlashDevelop and opened it you can create a new project and choose to create a new Flex 3 Project , choose a name and a location to save it and press ok.

Now you get a basic Flex project with Main.mxml as the only source file.

In order for you to compile this you need to let FlashDevelop know where to find the Flex SDK.
In Flashdevelop go to Tools -> Program Settings. Choose the AS3 Context and change Flex SDK Location to the path where you put your Flex SDK.

And that is Basically it. You should be able to compile your project just fine.

Please note:
Using Flashdevelop to create Flex 4 projects can’t be done right now (with FlashDevelop build 3.0.6).

This is because Flex4 updates it’s namespaces. In a default Flex 3 application your basic mxml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
	xmlns:mx="http://www.adobe.com/2006/mxml">
 
</mx:Application>

But to change it to the defaults for the Flex4 SDK it should be:

<?xml version="1.0" encoding="utf-8"?>
<s:Application 
	xmlns:fx="http://ns.adobe.com/mxml/2009"
	xmlns:s="library://ns.adobe.com/flex/spark"
	xmlns:mx="library://ns.adobe.com/flex/halo">
</s:Application>

If you try t compile this it gives an error saying that FlashDevelop “Could not resolve to a component implementation because FlashDevelop at this point doesn’t know how to handle the spark library. This most likely will be solved in a next release of FlashDevelop.

If anyone knows how to solve this problem, please post in comments :)

Categories: Adobe, FlashDevelop, Flex Tags: ,
  1. Greg
    February 22nd, 2010 at 04:33 | #1

    I’m stumped too. I tried mxmlc on the command line using a 5 line flex example from the adobe site – and it also failed with the same message.

  2. Greg
    February 22nd, 2010 at 04:44 | #2

    Cracked it – they have recently renamed the xml namespace.

    Change:
    xmlns:mx=”library://ns.adobe.com/flex/halo”
    To:
    xmlns:mx=”library://ns.adobe.com/flex/mx”

    See here:
    http://forums.adobe.com/thread/567177?tstart=0

  3. Ray
    February 24th, 2010 at 17:58 | #3

    Getting the spark library to work seems to require adding the spark.swc to the project’s libs, copying spark-manifest.xml into the project, and adding a namespace parameter to the compile options.

    I got FD3 to to build a project by copying both spark.swc and spark-manifest.xml from the SDK into the project’s libs directory and adding the following compile option (right click project – properties – compiler options tab – additional compiler options):

    -namespace library://ns.adobe.com/flex/spark libs/spark-manifest.xml

    Be sure also that the mxml file has the current namespace declarations.
    xmlns:mx=”library://ns.adobe.com/flex/mx”
    xmlns:s=”library://ns.adobe.com/flex/spark”
    xmlns:fx=”http://ns.adobe.com/mxml/2009″

    There might be a better way to reference the spark.swc library and xml than to copy the files into the project. I didn’t have the extra time to figure that part out. The -namespace compiler option is probably the key part.

  4. March 10th, 2010 at 11:25 | #4

    zHekTe Excellent article, I will take note. Many thanks for the story!

  5. July 19th, 2010 at 04:07 | #5

    cool :-)

  6. Dan
    August 4th, 2010 at 18:57 | #6

    Ray, be blessed for your resolution on spark problem.

  1. June 12th, 2010 at 09:30 | #1