-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Flex 3 with Java

Flex Builder is the official IDE for creating Flex applications, and as I mentioned earlier, it is built on the Eclipse platform. Flex Builder provides very powerful coding tools, such as MXML, ActionScript, and CSS editors with syntax coloring and hinting, statement completion, code collapse, interactive step-through debugging, code profiling; and very importantly, a rich visual-designing user interface layout, and more.
Later in this book, I will be using this Flex Builder IDE for demonstrating Flex code examples.
Also, make a note that if you are installing Flex Builder 3, then you need not install Flex SDK separately because Flex Builder 3 installs Flex SDK automatically as a part of its installation. You will learn more about the directory structure that the installer creates when you install Flex Builder in Flex Builder installation directory structure section.
Unlike the open source Flex SDK, Flex Builder is a licensed product from Adobe which you need to buy. But you can download a 60-day evaluation copy from Adobe's web site at http://www.adobe.com/go/flex_trial. Flex Builder 3 is available on Windows, Mac OS, and Linux operating systems.
Flex Builder comes with two different installation options. They are:
Flex Builder as a standalone IDE: This option installs Flex Builder as a standalone IDE with only the Flex perspective. So if you need to work on a Java project, go for Flex Builder plugin installation on top of Eclipse or install JDT (Java Development Tools) in Flex Builder to support Java development. You can download JDT from http://www.eclipse.org/jdt/.
Flex Builder as an Eclipse plugin: This option installs Flex Builder as an Eclipse plugin on an existing Eclipse IDE. Before installing it, you must first install Eclipse 3.2, or higher. So make sure you have done that.
An Eclipse perspective is a collection of windows/views and a mechanism of providing task-oriented interactions in the IDE that are associated with a particular programming language.
Flex Builder 3 installation consists of the following main components:
Flex SDK
The Eclipse-based IDE (Integrated Development Environment)
Flash Player 9 or higher versions
Now, assuming that you have downloaded Flex Builder 3 and are ready for installation, follow these steps. Please note that depending on which operating system you use, these steps will change. So please refer to the Adobe installation documentation at http://www.adobe.com/support/documentation/en/flex/3/releasenotes_flex3_fb.html#installation for installing it on Mac OS or Linux. There is only a one-step difference between installing Flex Builder as an Eclipse plugin and a standalone. I have combined installation steps for both into the following tutorial.
Start the installation by double-clicking on the downloaded file. A program, InstallAnywhere
, should start. It may take a few minutes before the first screen appears. It is a good idea to close any running Windows applications (especially browser applications) because Flex Builder will install Flash Player 9 or higher.
The first screen will prompt you to choose a language. Choose the appropriate language from the drop-down list and click on the OK button to proceed.
The introduction screen will be displayed. Click on Next.
The next screenshot is the license agreement screen. Read the agreement, select the I accept the terms of the License Agreement option, and click on the Next button, as shown in the following screenshot:
Now you need to choose the installation folder. Click the Choose button to choose anything other than the default location. Now click on Next to proceed, as shown in the following screenshot:
The next screen will appear only if you are installing Flex Builder as an Eclipse plugin. In this step, you need to choose the existing Eclipse installation root folder so that the installation wizard can configure the Flex Builder plugin. This works only with Eclipse 3.2 or higher versions. Please skip this step if you are installing Flex Builder as a standalone version.
The next screen is an optional installation, but it is a quite important step because it prompts you to install the debug version Flash Player in each of your installed browsers on your computer. Installing the debug version of Flash Player is very important in order to use Flex Builder's debugger to debug Flex applications. So, for now, we will continue with the default selection and allow the install wizard to install the debug version of Flash Player. We will skip other optional components in this tutorial, so click on Next to proceed.
The following screen details the pre-installation summary of your selections throughout this install wizard. Just confirm that the details are correct and click on the Install button to begin the installation process.
The next screen shown notifies the user of the installation's progress. The install wizard will install all necessary files on your system, including Java Runtime Environment. This may take a while, so please be patient.
Once the installation is finished, you can launch Flex Builder 3 from Windows | Program Files | Adobe | Flex Builder 3.
Adobe has a unique program called Free Flex Builder Pro for Education, where students and faculties can get a free licensed copy of Flex Builder 3 Professional. In order to register for this program, please visit http://www.adobe.com/products/flex/faq/#section-4.
Before we start using Flex Builder 3, let's have a quick look at its directory structure. The installer creates the following directory structure:
Directory |
Description |
---|---|
|
The top-level directory for Flex Builder |
|
A standard Eclipse folder that contains the |
|
A standard Eclipse folder that contains the plugins corresponding to the features of Flex Builder |
|
Contains Java Runtime Environment installed with Flex Builder, used by default when you run the standalone version of Flex Builder |
|
Contains the different versions of Flash Player—the standard version and the debugger version |
|
Contains the Eclipse plugins used by Flex Builder |
|
Contains the different Flex SDKs for a directory description |
Change the font size
Change margin width
Change background colour