I'm about to explode trying to figure out how to fix this so before I do so maybe you could help me? I'm developing an game under flash player 11 in flash builder 4.5.1.21328 and I wanted to play around with the new stuff, for example, the native JSON support, but when I try to launch the application in Flash Builder I get this:
ReferenceError: Error #1065: Variable JSON is not defined.
I've added compiler argument: -swf-version=13, I've downloaded the flash player 11 playerglobal.swc and placed where it should be in flash builder directory, so I'm stuck now.. How to fix this annoying thing and enable flash player 11 in flash builder?
When I use the 'Generate HTML wrapper file' option for my project and run the application in browser, it runs smoothly.
I've also had this issue and spent a lot of hours trying to figure it out, until I've found a solution that works for me. I've explained it here in this post in the Adobe Forums: http://forums.adobe.com/message/3954031
I hope that helps. Please let me know if that works for you as well.
EDIT: It seems the Adobe Forums are down right now, so I'm posting my answer here:
Well, after much tinkering, I think I've finally found a way to finally make it work!.
I've created some modified XML files with the profiles needed for AIR 3.0 and after a lot of tries, it finally works!
I've uploaded them here: http://www.mediafire.com/?d5e761frl5px4
These are the steps needed to get AIR 3.0 running properly:
Put all three files into the folder "c:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\Players"
Then, make sure you've unzipped the AIR 3.0 SDK into the folder "c:\Program Files (x86)\Adobe\Adobe Flash CS5.5\AIR3.0" Do not overwrite the contents of the "AIR2.6" folder, as suggested by the "Overlay AIR SDK" article (http://kb2.adobe.com/cps/908/cpsid_90810.html). It gave me problems. It's best to use a different separate folder. My XML files point to that new "AIR3.0" folder.
Inside the folder "c:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\ActionScript 3.0" create a new folder named "AIR3.0". Inside that folder, copy the file "airglobal.swc" located at "c:\Program Files (x86)\Adobe\Adobe Flash CS5.5\AIR3.0\frameworks\libs\air".
Finally, you will have to keep the file "descriptor-sample.xml" in the "c:\Program Files (x86)\Adobe\Adobe Flash CS5.5\AIR2.6\samples" folder, but change the xmlns attribute to "http://ns.adobe.com/air/application/3.0"
Yes, you have to change that inside the AIR2.6 folder even if the SDK has been put into AIR3.0. That's because of how the publish settings work in Adobe Flash. It's hardcoded into a DLL, so that can't be changed. Not very intuitive.
I think AIR SDK installations should be a lot more straightforward than this! I know Adobe AIR is meant for developers, not for final users, but still, all these not very well documented upgrade procedures are a pain in the ass. I've wasted A LOT of hours in this (more than half a day), with what should have been a straightforward upgrade!
Adobe should make a SDK installer so we do not have to be tinkering with all these error-prone procedures each time a new update is released!
Well, I hope those XML files are useful to somebody and avoids further frustration.
EDIT 2: I've realized the XML for iOS didn't work properly. I've uploaded a new iOS_AIR3_0.xml file replacing the old one in the same MediaFire URL linked above (you'll see it has newer date than the other files).
The problem with the old XML was that it had a <name> other than "AIR for iOS" (I had written "AIR 3.0 for iOS" to differentiate from the old version). It seems Adobe Flash CS5.5 looks for this string. If it's "AIR for iOS", then Flash presents the appropriate options for iOS in the "AIR for iOS Settings" window, but if that string is anything else than "AIR for iOS", then the settings shown are the AIR desktop ones. The only problem now is that you can't have 2 iOS options coexist (2.7 and 3.0) so you'll have to move the "AiriPhone.xml" file out of that folder to use the new XML for AIR 3.0 for iOS.
So you're changing the application behaviour based on the content of a string rather than an ID?! What about localization? I haven't tried localized versions of Flash CS5.5, but I suspect that string can't be translated, or else that settings window won't work.
So the AIR SDK has some hardcoded folder names in its DLLs, and Flash Pro CS5.5 changes AIR settings behaviour based on an English string which is shown to the user in the menus, instead of using an ID or any other variable... How clumsy is that?