After upgrading the AIR SDK to 3.0 in Flash Professional CS5.5 I've found some problems. First, the JSON class in the as3corelib.swc library now throws a couple of compile errors: 1061: Call to a possibly undefined method decode through a reference with static type Class. 1172: Definition com.adobe.serialization.json:JSON could not be found. At first I was completely puzzled, since I had the proper "import com.adobe.serialization.json.JSON;" reference, and I had the "as3corelib.swc" referenced in my ActionScript Properties, so how could that not be found? Then, I found out that's because it conflicts with the new internal JSON class included with AIR 3.0 (maybe it should have been called something else, to avoid conflicts with Adobe's own as3corelib library). The new native JSON class doesn't have the decode() method. Now it's called parse() Ok, so I've tried using the new JSON class, but after changing decode() with parse() and removing the "import com.adobe.serialization.json.JSON;" reference, Flash tells me that "Variable JSON is not defined". Really? The JSON class is showing in the Flash Builder code completion popup, complete with its all-new parse() and stringify() methods! So why does it say it's not defined? Also, my SWF file gets compiled with no errors at all, so that verifies that the new 3.0 libraries are in place. I only get the "JSON is not defined" error at runtime in ADL, not at compile time. Why? In order to upgrade to the AIR 3.0 SDK, I've followed this guide: http://kb2.adobe.com/cps/908/cpsid_90810.html I know that's about upgrading to AIR 2.7, but I suppose the steps to upgrade to AIR 3.0 would be very similar, only with the AIR3.0 SDK package, instead of 2.7. I also took care to type version="13" in all the XMLs, instead of version="12" as stated in that guide, which is meant for 2.7. Also, I followed this advice about adding -swf-version=13 in the Project Properties window in Flash Builder: http://blogs.adobe.com/cantrell/archives/2011/08/how-to-use-the-air-3-beta-sdk.html But that doesn't seem to make a difference, since, even though I use Flash Builder for code editing (which is usually used for Flex), my project is a Flash Professional project, not a Flex one, and when testing the project, Flash Builder runs Flash Professional to compile and then runs adl.exe (it's the same as if you click the option "Control / Test movie / in AIR Debug Launcher (Mobile)" inside Flash Pro). In the "ActionScript Settings" window in Flash Professional, I also have the proper airglobal.swc referenced (from the AIR 3.0 SDK), and the same airglobal.swc is referenced in Flash Builder as well (in "Referenced Libraries"), to get proper code completion. I've tried all sorts of things to try to get it to work, but no luck. Still get the "JSON is not defined" error at runtime. I'm starting to get desperate about this. I'm going to have to revert back to AIR 2.7.1, to stop wasting time on this issue. BTW, I'm also having another unrelated problem (though maybe it happens because of the same reason as the other problem). Now Flash Builder underlines the getTime() method in my code, as if it no longer were a method of a Date class instance. I have a line where I ask for the timestamp like this: ts = new Date().getTime(); That has worked perfectly fine up until now with AIR 3.0. Now, when hovering the mouse cursor over the orange "(?)" icon that appears at the left, Flash Builder tells me "Access of undefined property getTime". Why? The AS3 documentation doesn't say anything about getTime() getting deprecated of anything of the sort: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Date.html In fact, in the code completion popup that Flash Builder shows, now there isn't any mention of get or set methods, as you can see here: I suppose I can use the .time property instead of .getTime() but I don't know why I'm not getting all the methods I had available before. Any ideas why all this is happenning? Specially the dreaded "JSON is not defined" error.
... View more