Select to view content in your preferred language

Can't get Flex Viewer 2.2 source to compile in Flex Builder 3

796
2
03-28-2011 11:34 AM
HenryMoore
Emerging Contributor
Has anyone been successful in running the new Flex Viewer 2.2 source code with Flash Builder 3. I've downloaded Flex SDK 4.0 and the source for Flex Viewer 2.2. I've set up a virtual directory on my development box using IIS and pathed to bindebug folder. I'm also using Flash 10.0.22. I've noticed that there isn't an index.html file generated when I import and build the project.
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Henry,

   Ok so I took some time to figure out the steps necessary to get FV2.2 to build in Flex Builder 3.

1. You need the Flex SDK 4.1 installed in you Flex Builder 3
    http://opensource.adobe.com/wiki/display/flexsdk/download?build=4.1.0.16076&pkgtype=1
    To install the new SDK extract the contents of the zip file to your "C:\Program Files\Adobe\Flex Builder 3\sdks" and into a new folder called "4.1.0" Now in Flex Builder go to the Window menu and preferences, in the "type filter text" box type sdk then from the filtered results choose "Installed Flex SDKs" and click the add button, browse to the "C:\Program Files\Adobe\Flex Builder 3\sdks\4.1.0" folder and click OK.

2. Assuming you have the "FlexViewer 2.2 src" downloaded and extracted to a folder on your machine. Next you need to import the flex project. In Flex Builder go to the file menu and choose import > "Flex Project", choose "Project Folder" and browse to the "FlexViewer 2.2 src" then click finish. (If you are importing the Flex Viewer and you already have a Flex Viewer project, then you will have to go to the "FlexViewer 2.2 src" folder and open the ".project" file in notepad and change the name element to something like FlexViewer2.2).

3. Next in Flex Builder right click on the new and choose properties, switch to "Flex Compiler" and change the "Flex SDK version" to Flex 4.1. Next replace the "Additional compiler arguments" with these:
-locale en_US  -keep-all-type-selectors=true

Next change the "Required Flash Player version" to 10.0.22 or higher. (currently 10.2.52).

4. Next still in the projects properties switch to "Flex Build Path" and the "Source path" tab, click "Add Folder" and paste in "locale/{locale}"

5. Next is a very important step..  Still on the "Flex Build Path" delete the "Output folder" text and click OK (this deletes the bin-debug folder which is necessary).

6. Next in Flex Builder right click on the new and choose properties again and add back "bin-debug" to the "Output folder". (I know it seems odd, but it works).

7. Now because the project was not created in Flex Builder you have to tell Flash Player that the swf files are trusted. So enter this url in a web browser

http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html

Once there switch to "Global Security Setting Panel" (the little globe with a lock). Click edit locations > add location. Now this is where you can be very general or very specific. I choose to add my whole "C:\Flex Builder 3" folder (the folder\workspace where all my Flex Builder 3 projects are stored. Yours are likely in your documents and setting or users folder).

That was it for me. after that I could debug and run my Flex Viewer 2.2 project from Flex Builder 3.
0 Kudos
HenryMoore
Emerging Contributor
Got it Robert! I followed your instructions and used the 10.0.22 Flash Player and its working fine. Thanks for the help.
0 Kudos