Var JSON is not defined in flash professional cs6

Hi everyone! i'm a newbie.
i'm running flash cs6 and attempting to use JSON calls that are in flash player 11.2. When i test movie, everything is fine. When i publish to swf, i have error:
ReferenceError: Error #1065: Variable JSON is not defined.
          at loading::loading/doCMD().
please tell me how to fix it. thanks.

Json is now supported natively in the new version.
I used to use the adobe json serialization class: "import com.adobe.serialization.json.JSON" which when decoding used the function "JSON.decode()".
The native JSON class has changed the function to 'JSON.parse()". So try removing the old json class import and changing all the decode functions to parse.

Similar Messages

  • Resizing a 3d(or not) image in flash professional CS6.

    I need some help with a project I am working on.
    I am looking to create a simple user menu where you would input 3 values. Width, Length and Height (The scale would be fairly simple W 0-19, H 0-23 and L 0-31. So limited)
    These X,Y and Z values would then cause a image of a cube in that proportion to be displayed on a simple grid. Also flash would output a price using an equation using the inputted numbers.
    I think I will be fine with the actionscript for the equation but I am at a bit of a loss of how to deal with the visuals? Do I draw multiple separate images and call them up individually or is there a way to manipulate this (apparent 3d image) using action script referencing the outcome of the equation.
    I dont have much experience with manipulating 3D with flash. In this video I can see how to create a 3d box:
    http://noeruiz.com/tuts/how-to-create-3d-box-in-flash-cs4/
    But could I then manipulate this using actionscript?
    Or do I need to use a 3d package such as alterniva 3d?
    There must be a simpler way? Any help is really appreciated and if completed i will post results here for everyone.
    Cheers

    Away3D, Alternativa3D, Flare3D, they're all fine. If you're doing it for a commercial basis you'll need to consult the EULA of any specific framework but here's a simple example of Away3D in action (half way down the page is a cube):
    http://www.flashmagazine.com/Tutorials/detail/away3d_basics_5_-_primitives_part_1/
    Not bad for only needing this much code:
    http://www.flashmagazine.com/articlefiles/away3d/Basic08_cube.as
    All engines will require some kind of "set up" and then you can add things in, primitives like cubes, spheres, etc. Then lighting, materials, etc.
    The line of code that made that cube was very approachable:
    // create cube
    var cube:Cube = new Cube({width:200,height:100,depth:300,bothsides:true});
    // add to previously created scene (in link above)
    view.scene.addChild(cube);
    // Set one of the cubeMaterials to a partially transparent white material
    cube.cubeMaterials.left = new ColorMaterial(0xffffff,{alpha:.3});
    That's pretty easy.

  • [AIR 3.0] New JSON functionality doesn't work in FlashPro: Error #1065: Variable JSON is not defined

    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.

    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 (linked in the above post). 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 ***. 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.
    Regards,
    OMA2k
    PD: BTW, I still have the .getTime() issue described in my above post, but it's not very important,
    since I can still use the .time property. Still, it puzzles me why this is happening.

  • Swf-version can be specified when using SDK 3.6? [ Error #1065: Variable JSON is not defined ]

    I've been using playerglobal.swc of flash player 11 and SDK 3.6.
    ReferenceError: Error #1065: Variable JSON is not defined
    can be solved by setting -swf-version to 13. (http://forums.adobe.com/message/3933620#3933620)
    However, swf-version is not available in SDK 3.6.
    Can native JSON be used?
    Otherwise, can com.adobe.serialization.json.JSON be used without name conflict?
    JSON (from ...\flex_sdk_3.6\frameworks\libs\player\11\playerglobal.swc(JSON))
    com.adobe.serialization.json:JSON (from ...\as3corelib.swc(com/adobe/serialization/json/JSON))

    anyone know the answer to this?
    how are we supposed to use the new player features with using the 3.x SDK?

  • Profiling Error (Variable ContextMenuClipboardItems is not defined) on Flash Player 10

    Hi Team
    When i start the profiler i get the below error
    1.I am using FB 3.
    and flash player 10.
    Any pointers are highly appreciated.
    ReferenceError: Error #1065: Variable ContextMenuClipboardItems is not
    defined.
    at flash.ui::ContextMenu/initLinkAndClipboardProperties()
    at flash.ui::ContextMenu()
    at
    mx.core::Application/initContextMenu()[C:\autobuild\3.2.0\frameworks\pro\
    jects\framework\src\mx\core\Application.as:1154]
    at
    mx.core::Application/initialize()[C:\autobuild\3.2.0\frameworks\projects\
    \framework\src\mx\core\Application.as:844]
    at
    grip/initialize()[D:\eclipse\grip-app-client\grip\src\grip.mxml:0]
    at
    mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::c\
    hildAdded()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\mana\
    gers\SystemManager.as:2009]
    at
    mx.managers::SystemManager/initializeTopLevelWindow()[C:\autobuild\3.2.0\
    \frameworks\projects\framework\src\mx\managers\SystemManager.as:3234]
    at
    mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::d\
    ocFrameHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\
    \managers\SystemManager.as:3064]
    at
    mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.2.0\framewo\
    rks\projects\framework\src\mx\managers\SystemManager.as:2916]
    Thanks
    ilikeflex

    You have to use FB4 to profile on FP10
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • 'JSON is not defined' Error!

    Follow Christian Cantrell's Native JSON Support in AIR3. I try to use native JSON with Air 3 RC1. but at runtime I get: “ReferenceError: Error #1065: Variable JSON is not defined.”,The SDK is correct,any ideas?

    Hi,guys,at last i found the solution in the post “http://blogs.adobe.com/cantrell/archives/2011/08/how-to-use-the-air-3-beta-sdk.html” 。Just go to "Project Properties," then "Flex Compiler." In the "Additional compiler arguments" box, add "-swf-version=13" (13 represents air3)

  • Adobe Flash Professional CS6, cant use spell checker, missing or not there

    I am trying to use spell checker on Adobe Flash CS6, everywhere I look for help is very minimal. Most places just say click Text > then Check Spelling but I can't see this anywhere, I have found these instructions under Adobe CS6's Help but the Help on Adobe's website was brief an unhelpful.
    I am unsure what is wrong mainly because of the minimal help I found on-line but as I said Check Spelling is not under Text and nowhere else as far as I can tell. Any advice would be helpful, I seem to remember having to add a Spell Check Dictionary manually on much older versions of Macromedia Flash is this the case here? If so why is it so hard to find help on this matter?
         thanks in advance for any help.
                       Jamie North - Ucall ltd

    Thanks for the response but you have just told me the only piece of information I can find about this - its under Text. But like I said it isn't there, there's nothing to do with spelling at all within my Flash programme anywhere. I am using it on Windows 7 64-bit using Adobe Creative cloud on Adobe Flash Professional CS6 - Version 13.1.0.226
    Here is a screenshot
    Also why is your answer marked as "Correct?" We have not resolved this issue so far.
         Thank You
              Jamie

  • I need help migrating an existing project from Flash Professional CS6 to Flash Builder 4.6.

    I have followed tutorials...instructions on the web...all I get are unsolvable errors.
    I have a large Air application that compiles fine and works in Flash. However I would like to take advantage of the as3xls api which does not work in Flash Professional (for no reason in particular the internet just tells me it won't work because Flash Professional cannot access some part of the Flex framework).
    So I want to make my project work in Flash Builder. However, when I attempt to reference my document class, flash builder gives me an error telling me the package path com.andrewbefus.ModelMapper no longer works. It does this no matter how I select the folder to reference my document class. If I change the path to nothing...Flash Builder is happy with my document class and unhappy with every other class I have made.
    Then I decided to make a new Flash Builder ActionScript file and simply replace the ModelMapper.as document class that Flash Builder created with my completed ModelMapper.as. After some messing around with paths and directories, I got Flash Builder to be happy with my program structure but then all hell broke loose on almost every single Class outside the Flash Builder framework. One by one I attempted to tell Flash Builder where to go to get my components, fl.motion classes, and my custom classes but Flash Builder refused to recognise them unless I reference the folder containing the files, and then proceeded to tell me that the project path of every single class needed to be changed. I imagine if I spend the rest of my day mucking around with this something else will come up.
    I went looking for a tutorial explaining how to migrate a Flash Professional project over to Flash Builder. The closest thing I could come up with told me to just select my fla. file by going Project<Flash Professional<Create project using Fla file... which worked great except refused to compile my project as a desktop application for no sane reason - giving no option to select my project when I attempted to create a new Run Configuration.
    One frustration after another....

    I've also followed all the instructions here:
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
    Still no luck...
    L.

  • Creating a prepackaged AIR app | Learn Flash Professional CS6 | Adobe TV

    Discover how to deploy AIR applications from within Flash Professional CS6 as "captive runtimes." Captive runtime allows developers to bundle the AIR framework into an AIR application, creating a self-contained entity that eliminates third-party dependency.
    http://adobe.ly/JXWmgc

    Hi I am a little confused.
    I wan't to export an AIR "Application with runtime embedded" I can do this fine for a MAC file from my mac I can just check the "Application with runtime embedded" check box and I get a file that I don't have to embed. I would like to do the same for a PC I have flash installed on windows 7 parallels. When I check the "Application with runtime embedded" check box and export I get a file structure instead of an app I can open. The mac version I can just double click and it opens without having to install the app.
    Is it then true that you can not have an AIR Captive file file for the pc that you don't have to run through an installer process?
    Many thanks
    Oli

  • Adobe Flash Professional CS6

    What to do When Aodbe Flash Professional CS6 Text tool is not working.?
    I am using windows 8

    Maybe ask in the Flash forum?  http://forums.adobe.com/community/flash

  • Problem installing Flash Professional CS6

    Hi,
    Would you be able to advise.
    At present I`m looking into building a network deployment of windows version CS6,  that we can install on our teaching machines here next year.
    It`s the Design and Web premium version that we'll be making available.
    Everything seems to install correctly expect Flash Professional CS6.
    Install fails for this with the following error at the end of the log file.
    This is happening on multiple machines.
    I really can`t see how this could be a problem with the machines as all other products install correctly.
    I`ve tried disabling virus checker and also ensured that software is run with Admin Rights.
    Also this happens from both the install media and a download of the Flash CS6 media from your site.
    Any ideas as to what might be causing this.
    Many Thanks
    Mike Beales
    Software Services
    From Adobe install logs files.
    *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
    Installer Operation: PayloadInstaller
    *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
    Request to install payload
    Payload {4FAB339E-2132-434F-9376-9CD735E4C69C} Adobe Flash CS6 12.0.0.0: Calling ARKEngine from path C:\Program Files (x86)\Common Files\Adobe\OOBE\PDApp\DECore\DE6\resources
    Extracting assets...
    From Windows Event Viewer
    The description for Event ID 1 from source Adobe Setup cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    Installing {BD5669B5-49FF-4490-B956-E9D7CB9B0ADC} Adobe Flash CS6 Driver 12.0.0.0
    the message resource is present but the message is not found in the string/message table

    As far as I know, it is only Windows or Mac
    MINIMUM System requirements for Cloud Programs... scroll down and check each program
    -http://helpx.adobe.com/creative-cloud/system-requirements.html

  • What is Flash Professional CS6? | Learn Flash Professional CS6 | Adobe TV

    Dive into Adobe Flash Professional CS6. See how web designers, developers, and animators can use Flash to create rich content for screen and web environments.
    http://adobe.ly/Jo2HUO

    Actually, what Flash Pro is, is a profound disappointment. I've been using Flash since Macromedia days and have generally put up with the huge change in focus that's happened between AS2 and AS3. I was irked by the sudden need to have to declare classes for even the simplest functions but lived with it because there was nothing much else out there. It wasn't until very recently that the truth finally dawned on me; Flash is a bloody mess.
    Adobe have completely betrayed the design community and after long consideration I've come to the conclusion that Apple were entirely right to prevent Flash appearing on iOS devices. I don't want to have to write reams of code to make a simple ad, it's a waste of time and money and my clients really don't care whether their code is elegant or not. All that matters is pixels on screen.
    Flash has completely lost its way. Instead of being a ground-breaking design tool it's just another OOPL with a half-baked IDE. What's the point of Flash? It's a product which is now conceptually flawed, a scripting language with a few graphic bolt-ons, a tool which actually reduces productivity instead of enhancing it.
    The name Flash Pro is misleading, it should be called ActionScript Pro. Flash has become a programming tool only, and in the process thrown up so many barriers to productivity that it's become all but unusable in the purpose for which it was originally conceived.
    It seems to me that Adobe lack the imagination to produce ground-breaking products any more. All they deliver are engineering solutions with incremental improvements and that's only a good enough solution whilst there's nothing else out there. Quite evidently the ground is shifting and as a product Flash is clinging on to the edge of a cliff. Flash is exposed.
    In the 21st century it seems extraordinary that a product marketing itself as a design tool requires designers to start a creative project by deciding which packages to import. This is useful to me why? Does my client give a damn? Why doesn't the application work that out for itself? It's like asking a driver to service their own engine every time they take the car out. Sure, a knowledge of code is beneficial but starting from first principles every time you start a project? It's just not good enough.
    I'll keep using Flash for now, but as soon as something new gains sufficient critical mass - Corona, Kwik 2, anything that actually gives designers productivity tools - I'm out of here.

  • Issues with Adobe Flash Professional CS6

    I have been using Adobe Flash Professional CS6 and have had a few issue with it.
    -The program crashes
    -The program stops responding quite often whilst I am working and will take a few seconds to load
    - It will sometimes glitch and my clicks will be delayed. I have also had the issue where certain pencil lines will not undo
    - When moving things on the stage they will sometimes duplicate themselves
    - Sometimes when I have selected a tool and used it once it will automatically change back to the Selection Tool
    - Sometimes after I have imported a video the keyboard shortcuts will stop working
    Has anyone else had these issues and if so, please, how do you fix it?

    My computer Spec's are
    - ACER
    - Aspire 5745G
    - Windows Home 7 Premium
    - Service Pack 1
    - Intel Core i5 CPU. [email protected]
    - RAM 6GB
    - 64-Bit Operating System

  • FAQ: Unable to import MP3 files in Flash Professional CS6

    If you are unable to import mp3 files in Flash Professional CS6, ensure that you update QuickTime(7.7.1) and iTune(10.5.3.3) versions. This is necessary to import .mp3 files of bitrates higher than 192kbps.

    Yep that worked!
    The "update" in the library would not update the content but the drag and drop worked fine.
    Note: The path in the update dialog shows a relative path and after the drag and drop it shows an absolute path to the file
    I also had an issue with the audio being changed from stream to event.

  • Flash Professional CS6 has lost its start page

    My Flash Professional CS6 program no longer starts with the usual menu page.  Instead I get a grey page with the message "Current selection can not have actions applied to it."  Moreover, the timeline seems disabled since no layer options appear

    Open your Preferences and see about setting how the program starts...
    Edit -> Preferences -> General -> On launch

Maybe you are looking for