This seems to happen to people who’ve installed CF8 and are using FlexBuilder 2 to create Flex projects using Flash Remoting or LCDS (formerly FDS). Why does this happen?

If you look in the properties for a Flex project under FB2 w/a CF8 server, you’ll see that there’s an entry pointing to {cf_install_path}/wwwroot/WEB-INF/flex/libs/fds.swc. This library conflicts with the Flex2 framework SWCs that come with FlexBuilder. The solution?? Pretty easy.

In the project’s Properties panel (right-click the project and hit Properties…) you’ll see a Flex Build Path entry in the list on the left. Click it, then choose the Library Path tab on the right. Now click “Add SWC Folder…” and navigate to your CF server’s {cf_install_path}/wwwroot/WEB-INF/flex/libs folder and click Choose. This will add the {cf_install_path}/wwwroot/WEB-INF/flex/libs folder as a Flex2 library folder to your project. Now remove everything in the Build Path Libraries: window except for:

${FRAMEWORKS}/libs/playerglobal.swc

${FRAMEWORKS}/libs/locale/{locale}

/Applications/ColdFusion8/wwwroot/WEB-INF/flex/libs

NOTE: Your path to /WEB-INF/flex/libs may be different

Now go back into FlexBuilder 2 and use the Project menu to get to the Clean… menu choice. Choose to clean your Flex project and it should compile, run, debug and in general work just fine with Flash Player 9.0.x.

I was having several issues caused by these mismatched libraries… from the “Illegal override of…” error to being unable to run the project at all, to the project compilling and launching but not running right. It was very frustrating, but once I switched over to the Flex2 libraries that come with CF8 I was up and running just dandy.