Select Project > Properties in Flex Builder’s main menu to launch the Project Properties dialog box. Select Flex Compiler from the left menu, click the Use a specific SDK radio button, and select the Flex 4 SDK you added in the previous step.

In the HTML wrapper section of the Flex Compiler settings dialog, set the required Flash Player version to 10.0.0 (see Figure 1). Click OK to close this dialog box.

Figure 1. Flex Builder Project Properties dialog box.

If you forget to change the Flash Player detection to Flash Player 10, you may see the following compiler errors in your Flex Builder Problems tab:1046: Type was not found or was not a compile-time constant: ContentElement.
1046: Type was not found or was not a compile-time constant: ElementFormat.
1046: Type was not found or was not a compile-time constant: FontMetrics.
1046: Type was not found or was not a compile-time constant: GroupElement.
1046: Type was not found or was not a compile-time constant: TextElement.
1046: Type was not found or was not a compile-time constant: TextLine.

If you haven’t already installed the Flash Player 10 beta yet, you can find the various installers in the downloaded SDK’s /runtimes/player/10/{OS}/ directory.

Now that you have the Flex 4 SDK and Flash Player 10 installed, now it’s time to write a simple test file using the latest Flex SDK.

Thanks for the great info, as always! Does anyone know if the latest SDK builds fix the issue with the FileUpload, where it had a malformed post that caused this error on Tomcat’s error log: “Multipart: final boundary missing”?

I’m not aware of that specific bug, but if it is FileReference related, it would be a Flash Player issue, not a Flex SDK issue.
If the problem still occurs with the latest public version of Flash Player 10 beta, can you file a bug at http://bugs.adobe.com/flashplayer/ if a bug isn’t already filed?

Thanks,
Peter

PS: if you post the bug number here, a few of us can vote on the issue.

However, it’s marked as “unresolved” and doesn’t seem to be a high priority. A lot of people have run into the issue; the only solution on an Apache/Tomcat server is to turn off the mod_security on the app — which then opens you up to attacks.

Hi Peter,
I’m trying to use the FileReference API in FB3 with new Gumbo, but I don’t able!!
I’m looking for the solution in several forums but there isn’t anything about this problem.
Maybe my problem is stupid, but have you any suggests for me?

Thanks for the reply, unfortunately that’s not it. I tried on a different machine over the weekend but got the same issue. Am I missing out something?? All I’m doing is:-
1. Download & install gumbo sdk.
2. Create new project, under Project Properties>Flex Compiler, set SDK to Gumbo, set target Flash player = 10.
3. That should be it. However I get the error message I mentioned above, also using Adobe’s test script at the bottom of this page:-http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Application?showComments=false
I also get a similar problem,
Could not resolve to a component implementation.

Seems to be an issue with the mx namespace, after xmlns:mx=”library:adobe/flex/halo”

I’ve tried this on OSX and WinXP, same result. I have also written a non-MXML application that uses SDK 4.0 in order to try out the new Flash 10 features, and that is fine, no problem.

Correct, the xmlns:mx="library:adobe/flex/halo is old and would require and older Flex Gumbo SDK to compile. If you are using a recent Flex Gumbo SDK, you’d either need to import the 2009 namespace twice (once with the “mx” prefix), or else just use <Label/> instead of <mx:Label/>.

The example on the opensource.adobe.com site is old and should be corrected for the latest Flex Gumbo SDK.

I also updated the example code above (inline, I didn’t republish ZIPs and SWFs), so hopefully that will help.
After re-reading the example, it is important to note that with the latest Flex Gumbo SDK, you do not need to import the “mx” namespace to use the Halo components. You can use the default namespace and use the Halo Label control by typing <Label/>. If you want to use the “mx” namespace for any reason (you just like the way it looks), you can add the mx namespace and use the same namespace URL (http://ns.adobe.com/mxml/2009 — see my previous comment for an example), but the 2009 namespace contains both the Gumbo and Halo components.

Not sure if that made it any clearer, but yeah. Basically, both of these should work and just depends on your personal preference.Default 2009 namespace:

From last nigth for about 4-5 hours i spend in working FileReference_load_test in your example,
i upgraded to flex 3.02 version having flex_sdk_4.0.0.4845 and flash player is set to 10.0.0
but i am not at all able to compile, I get the same error in Flex Builder 3.0.2 also (”An unknown item is declared as the root of your MXML document. Switch to source mode to correct it.”)

I read all your comments could not solve it, i am very newbie and using your site to learn a lot, thanks a lot for this amazing help over blogs.

Can you please help me in this issue, i am very basic coder. Just now started learning.

My need is to browse the jpg file preview it and add it.http://www.mafunet.com/crop/ i saw the above example but there is no souce code :-)
i need to crop the image exactly to the same size and save it before any one uploads to the server

I’m curious why, in all these examples, both the default and mx namespaces are declared with the same value… There’s no reason to use 2 that I can think of, personally I’ve always just used the default. The first thing I’ve always done when creating a new mxml component is change <mx:Component xmlns:mx=”http://www.adobe.com/2006/mxml” > to <Component xmlns=”http://www.adobe.com/2006/mxml” /> just for the sake of saving keystrokes.

I guess my point is that, when, using the example above with both namespaces,
<FxButton label=”Gumbo Button”/>
<mx:Button label=”Halo Button”/>
would be exactly the same as:
<mx:FxButton label=”Gumbo Button”/>
<Button label=”Halo Button”/>

what’s the point in using both? I guess the fact that the majority of the discussion in this topic is pertaining to the design view, which I personally have never used, may be in some way relevant. However, as far as straight coding is concerned I’d recommend just using one namespace or the other, just to keep yourself sane.

Justin Buser,
In this example there is no reason why you would need to declare two namespaces which which resolve to the same URL (unless you explicitly wanted to mx: prefix all your Halo controls, for some reason).

But the SDK recently underwent a big rename (see the “Dropping the Fx Prefix” page on the opensource.adobe.com site for more details), so all these old Gumbo examples will ultimately be rewritten so they’ll compile with the latest nightly Flex Gumbo SDKs).

i tried ur code but i m still facing same problem.
and error is at “xmlns:mx=”http://ns.adobe.com/mxml/2009″”
For this only i m getting error as,
Could not resolve “Applictaion” to a component implementation.
Are there any other settings for project properties?