Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Flex Developer Center /

Moving existing Flex projects from Flex Builder 3 to Flash Builder 4

by Andrew Shorten

Andrew Shorten

Modified

30 April 2010

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Flash Builder migration

Requirements

User level

All

If you want to start using Flash Builder 4 with your existing Flex 3 projects, there are a number of different approaches you can take, depending on the Flex SDK features you want to use and the amount of migration work you're prepared to undertake.

Below is a quick guide to the options available to you, ordered by the amount of migration effort potentially required―from no effort (for using the existing Flex 3 SDK in Flash Builder 4) up to a full migration using all the new Flex 4 SDK language features and Spark components.

Note: To learn about the differences between Flex 3 SDK and Flex 4 SDK, you should read the article Differences between Flex 3 and Flex 4.

I want the new Flash Builder 4 features, but can't switch SDK versions.

Migration required: None; requires Flash Player 9 or higher

You can move existing Flex 3 applications, developed using Flex Builder 3, to Flash Builder 4 without needing to migrate the application to use the Flex 4 SDK―this enables you to get the benefit of most new Flash Builder 4 features straight away on an existing project.

Flash Builder 4 features include a network monitor, enhanced debugging, new refactoring support, code editing improvements, unit testing support, and the data-centric development (DCD) workflow―in total more than 50 features that will make you more productive when building Flex applications.

Watch James Ward demonstrate some of the new features in Flash Builder 4 that work with a project based on the Flex 3 SDK.

fig00 Watch the presentation (Running time: 5:02)

Follow the steps below to import projects into Flash Builder 4 and continue using Flex 3 SDK:

  1. In Flash Builder 4, go to File > Import > Flash Builder Project… (see Figure 1).
Import Flex Project
Figure 1. Import Flex Project
  1. After importing the project, you will see a dialog box asking you to choose the Flex SDK version of the project. Flash Builder 4 comes pre-installed with the latest version of the Flex 3 SDK, version 3.5.

    If your project is already based on Flex SDK 3.5 or you would like to move it to the latest release, then select Flex 3.5 from the "Use a specific SDK" pull-down menu (see Figure 2) and skip to Step 5.

Use a specific SDK
Figure 2. Use a specific SDK

If you were using Flex SDK 3.4 or earlier, then you will need to download the required SDK and configure Flash Builder 4 to use it―this is straightforward and only needs to be done once.

From the Adobe Open Source website, select a Milestone Release Build for Flex SDK 3.0, 3.1, 3.2, 3.3 or 3.4, depending on the SDK you are using with your project (you can check this in Flex Builder 3 by looking at the 'Flex Compiler' properties for the project). Alternatively select a stable or nightly build if you know that is what you need.

Unzip the downloaded SDK into the sdks folder in the Flash Builder 4 application folder ―on Mac OS X this will likely be /Applications/Adobe Flash Builder 4/sdks/ and on Windows /Program Files/Adobe/Adobe Flash Builder 4/sdks.

  1. Click the "Configure Flex SDKs…" link, the Choose Flex SDK Version dialog box, and then the "Add…" button. Select the SDK folder you just unzipped and Flash Builder should recognize it and add it to the list of installed Flex SDKs (see Figure 3).
Preferences (filtered)
Figure 3. Preferences (filtered)

Make sure to then select the newly installed SDK as the version in the "Use a specific SDK" pull-down menu.

  1. In the "Project will be upgraded" dialog box, select OK to make the project compatible with Flash Builder 4 (note that this will mean the project can no longer be opened in Flex Builder 3, but all your MXML and ActionScript files are still accessible via the file system should you want to merge any changes back into your project in Flex Builder 3) (see Figure 4).
Project Will Be Upgraded dialog box
Figure 4. Project Will Be Upgraded dialog box
  1. After completing the import process you may see an error reported in the Problems view that relates to the creation of the HTML Wrapper (see Figure 5). To resolve this issue, simply right click on the message and select "Recreate HTML Templates".
Error reported in the Problems view
Figure 5. Error reported in the Problems view

You are now ready to continue working on your Flex 3 project in Flash Builder 4!

I want the new Flash Builder 4 features and the faster Flex 4 compiler, but I need to maintain my application's existing behavior.

Migration required: Code changes unlikely; requires Flash Player 10

To use the faster Flex 4 compiler with an existing Flex 3 project, you can import it into Flash Builder 4 and use the "Flex 3 compatibility mode" option (see Figure 6)―this maintains the existing behavior of the application and shouldn't require any changes to your code. You should however see significantly improved compile times for the project.

Use Flex 3 compatibility mode
Figure 6. Use Flex 3 compatibility mode

Note however that none of the Flex 4 language features or the new Spark components will be available in the project.

Choosing this checkbox sets the –compatibility-version flag on the compiler to 3.0. For more information on what this flag does, refer to this document.

I want the new Flash Builder 4 features and all the new Flex 4 language features, but I don't want to adopt the new Spark component architecture.

Migration required: Some code changes likely as Flex 4 features are incorporated; Flash Player 10 required

To make use of just the new Flex 4 language features in your existing project you can choose to use the Flex 4 SDK during the project import, but then specify that only the MX component set is available. You can do this by going Project > Properties > Flex Build Path and selecting "MX only" component set from the Library Path dialog box once you've imported the project (see Figure 7).

Select MX only component set.
Figure 7. Select MX only component set.

The new language features available to you include two-way data binding, the new States model, declarative layouts, enhanced effects, and advanced CSS.

You will notice the following behaviors in Flash Builder:

  • New documents will use the MXML 2009 namespace
  • The components panel in design view will show only MX components
  • Content assist will show only MX components
  • Halo theme will be set by default
  • Flex 4 language features are only available in documents using the MXML 2009 namespace
  • Advanced CSS is supported, however existing CSS Type selectors will need to have namespaces added (you will see compiler warnings otherwise and styles will not be applied correctly).

For more information on these features, and potential issues you may encounter whilst migrating your application, review the Flex 4 features and migration guide.

I want the new Flash Builder 4 features, all the new Flex 4 language features and I want to add Spark-based components into my existing application.

Migration required: Some code changes likely as Flex 4 features are incorporated; Flash Player 10 required

You can continue to use existing MX components alongside the newer Spark components in the same Flex application, allowing for a gradual adoption of the new component architecture. You should only replace existing MX components with Spark components if required; instead focus on using Spark components when adding new functionality to your application.

Upon importing your Flex 3 project into Flash Builder 4 and selecting to use the Flex 4 SDK, you will notice the following behaviors in Flash Builder:

  • New documents will use the MXML 2009 namespace
  • Content assist will list Spark components before MX components
  • The components panel in design view will show Spark components in documents with the MXML 2009 namespace and MX components in documents with the MXML 2006 namespace
  • Spark theme will be set by default
  • Flex 4 language features are available in documents using the MXML 2009 namespace
  • Advanced CSS is supported, however existing CSS Type selectors will need to have namespaces added (you will see compiler warnings otherwise and styles will not be applied correctly).

For more information on these features, and potential issues you may encounter while migrating your application, review the Flex 4 features and migration guide.

To learn more about what's new in Flash Builder 4, you should take a look at the following resources:

  • Five most-asked for features from developers
  • Developer productivity enhancements
  • A complete list of new features in Flash Builder 4
  • Flash Builder 4 secrets (great tips on how to be more productive)
  • Data-centric development


This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 Unported License.

More Like This

  • Flex Solutions excerpt: Migrating Flex applications onto the desktop with Adobe AIR
  • Migrating Flex 3 applications to Flex 4 – Part 2: Beginning migration of the Dashboard application to Flex 4
  • Migrating Flex 3 applications to Flex 4.5 – Part 1: Importing the Flex 3 Dashboard application into Flash Builder 4.5
  • Migrating Flex 3 applications to Flex 4 – Part 1: Importing the Flex 3 Dashboard application into Flash Builder 4
  • A Flex 3 developer's introduction to Flex 4.5 and Flash Builder 4.5
  • Migrating Flex 3 applications to Flex 4 – Part 4: Using Spark Panel, List, and VGroup components and adding custom skins and states
  • Migrating Flex 3 applications to Flex 4 – Part 3: Introducing Spark components and simple skins
  • Transitioning an application from Flex 3 to Flex 4
  • Technical guide: Upgrading Flex 3 applications to Flex 4 SDK
  • Migrating Flex 3 applications to Flex 4.5 – Part 4: Using Spark Panel, List, DataGrid, and VGroup components and adding custom skins and states

Tutorials & Samples

Tutorials

  • Flex mobile performance checklist
  • Flex and Maven with Flexmojos – Part 3: Journeyman
  • Migrating Flex 3 applications to Flex 4.5 – Part 4

Samples

  • Twitter Trends
  • Flex 4.5 reference applications
  • Mobile Trader Flex app on Android Market

Flex User Forum

More
07/25/2011 Flash Player Debug Issues - Safari 5.1 & Chrome 13
04/22/2012 Loader png - wrong color values in BitmapData
04/22/2012 HTTPService and crossdomain.xml doesn't work as expected
04/23/2012 Memory related crashes in Flex application

Flex Cookbook

More
04/06/2012 How to detect screen resize with a SkinnableComponent
02/29/2012 Embed Stage3D content inside Flex application components
02/15/2012 Custom WorkFlow Component
02/09/2012 Using Camera with a MediaContainer instead of VideoDisplay

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement