📜 ⬆️ ⬇️

Adobe Flash CS5 + Adobe Flash Builder - Common Projects

As you know, these two products get along together perfectly. What is surprising - many do not know about it. 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 we have Flash ?
The answer is fairly obvious:
1. Normal Debug (condition breakpoints and other charms)
2. Normal code editor with at least some refactoring
3. Version control
4. Integration with bugtrackers
5. Other Eclipse Goodies

1. Absolute Paths
2. Version control
3. Flex library projects and their connection
Under the cut description of a soft way to create a project, in which there will be no problems with either svn or absolute paths.


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

This is an intermediate step, it will allow us to struggle with the fact that when creating a project, Flash Builder will connect raws as an external folder.

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

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

OK OK. Flash Builder opens with a project creation dialog:

We do not need to change anything, just press Finish.

We have a project TestFlashProject. The main class is NOT CREATED and it is just fine.
5. Close the FLA file (after saving)
6. Transfer the FLA file from the Workspace folder to the project folder
7. Switch to Flash Builder, open the project properties, go to properties on Flash Professional:

Select the path to the FLA and press Edit. Specify the new path to the FLA. It turns out like this:

Let's press OK.

Then Flash Professional will open by itself (if you have 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 related to it in a relative way. No problems with the transfer.
In Flash Builder, you can now press Cmd (ctrl) + Enter to compile, debug and run, and enjoy life.


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

Flex library projects

A slight difficulty can be caused by the connection of Flex library project-s.
Why connect them? If you still haul source code kernels of similar applications with copy-paste as files from one to another, I have bad news for you.

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

Simply connecting it through project properties in Flash Builder will cause 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, you do not want - make. Go to Flash Professional, open our TestFlashProject.fla
File -> ActionScript settings:

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

OK, then Cmd (Ctrl) + Enter ...

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

Some things are not a bit obvious, but by and large everything is simple.

Source: https://habr.com/ru/post/106300/

All Articles