Adobe Flash CS5 + Adobe Flash Builder - common projects


    As you know, these two products get along well together. What is surprising - many do not know about this. They choke, spit, but write code in Flash CS 5.
    This article tells how to cross these two products and how to overcome minor troubles in the process.

    Why do we need Flash Builder if there is Flash ?
    The answer is quite obvious:
    1. Normal Debug (condition breakpoints and other delights)
    2. Normal code editor with at least some, but refactoring
    3. Version control
    4. Integration with bugtrackers
    5. Other goodies Eclipse

    Problems:
    1. Absolute paths
    2. Version control
    3. Flex library projects and their connection

    Under the cat is a description of a soft way to create a project in which there will be no problems with either svn or absolute paths.


    Crossbreeding


    1. Open Flash CS5 and create an ActionScript 3.0 project.
    2. Save it to the Flash Builder Workspace folder.
    For example:
    / Users / alex / Documents / Adobe Flash Builder 4 / labs / TestFlashProject.fla
    Where
    / Users / alex / Documents / Adobe Flash Builder 4 / labs /
    Path to workspace

    This is an intermediate step, it will allow us to fight against the fact that when creating a project Flash Builder will connect raw materials as an external folder.

    3. Open Flash Builder, select the workspace we need (File -> Switch workspace)
    4. Return to Flash Professional. Go to the document properties (by clicking on the frame with the mouse and going to Properties). We need to assign a Document class. Click on the Edit class definition:


    Enter the class name and select Flash Builder from the list of applications for editing :


    Click OK. Flash Builder opens with a dialog for creating a project:


    We don’t need to change anything, just push Finish.

    We got the TestFlashProject project. The main class has NOT CREATED and it's just great.
    5. Close the FLA file (having saved it beforehand)
    6. Transfer the FLA file by hand from the Workspace folder to the project folder
    7. Switch to Flash Builder, open the project properties, go to Flash Professional in the properties:


    Select the path to the FLA and click Edit. Specify a new path to the FLA. It will

    turn out like this: Let's push OK.

    Then Flash Professional will open by itself (if you closed it), and the dialog for creating the main class will appear in Flash Builder:


    Create and enjoy. The first stage is over.
    The fla file is in the project folder. Flash builder project is associated with it in a relative way. No migration problems.
    In Flash Builder, you can now press Cmd (ctrl) + Enter to compile, debug and run, and enjoy life.

    Svn


    Actually, after all the project files are in the project folder and all the External folders have disappeared, there is no problem. We work as with a regular Flash Builder project.
    (If interested, I can tell you how it hooks to svn, but everything is quite obvious and simple)

    Flex library projects


    Connecting Flex library projects can cause a little difficulty.
    Why connect them? If you still drag the source code of the core of the same type of application with copy-paste of as files from one to another, I have bad news for you.

    So there is the Flex Library Project. For simplicity - it lies in the same workspace. For example:


    Simply connecting it through the project properties in Flash Builder will lead to trouble: Flash Professional will not see it when compiled.

    (However, you need to connect it in order for Flash Builder to see the classes normally)

    Okay, if you don’t want to, we’ll force it. Go to Flash Professional, open our TestFlashProject.fla
    File -> ActionScript settings:


    Add the path to swc, and then set it to relative (we want everything to be fine with version control, right?). The following will


    turn out: Press OK, then Cmd (Ctrl) + Enter ...

    Hurray! Everything compiles, works and, most importantly, uses relative paths!

    PS:
    Some things are a little not obvious, but in general, everything is simple.

    Also popular now: