Fix JSON error compiling Flare with Flex SDK 4.6 and compc #7

Open
rpitting opened this Issue Jun 14, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@rpitting

If you are having trouble compiling Flare with the Flex SDK 4.6 and getting some error with com.adobe.serialization.json.JSON, it's because the API has changed.

How to fix:

  1. Remove any imports of com.adobe.serialization.json.JSON, it's not needed anymore.

  2. Replace JSON.encode with JSON.stringify

  3. Replace JSON.decode with JSON.parse

  4. In build.xml, in the target flare, uncomment this line

      <source-path path-element="${flare.lib}/"/>
    
@charlesone

This comment has been minimized.

Show comment Hide comment
@charlesone

charlesone Jul 3, 2013

I went through these changes using Flashbuilder 4.6 and got the number of errors down to one:


So, following the direction of "Essential ActionScript 3.0" - Colin Moock, pp. 787-8:


To do so in Flex Builder 2, follow these steps: 
1. In the Navigator panel, select the project folder for the Main.swf application. 
2. On the Project Menu, choose Properties. 
3. On the Properties dialog, choose ActionScript Build Path. 
4. On the Library path tab, click the Add SWC button. 
5. On the Add SWC dialog, specify the path to module.swc.
6. On the Add SWC dialog, click OK. 
7. Under "Build path libraries," expand module.swc in the tree. 
8. Under module.swc, select "Link Type: Merged into code." 
9. Click the Edit button. 
10. On the Library Path Item Options dialog, for Link Type, choose External. 
11. On the Library Path Item Options dialog, click OK. 
12. On the Properties dialog, click OK.

You might have thought that would fix it, but no, the error persists doggedly.

What might be next?

Charlie ...

I went through these changes using Flashbuilder 4.6 and got the number of errors down to one:


So, following the direction of "Essential ActionScript 3.0" - Colin Moock, pp. 787-8:


To do so in Flex Builder 2, follow these steps: 
1. In the Navigator panel, select the project folder for the Main.swf application. 
2. On the Project Menu, choose Properties. 
3. On the Properties dialog, choose ActionScript Build Path. 
4. On the Library path tab, click the Add SWC button. 
5. On the Add SWC dialog, specify the path to module.swc.
6. On the Add SWC dialog, click OK. 
7. Under "Build path libraries," expand module.swc in the tree. 
8. Under module.swc, select "Link Type: Merged into code." 
9. Click the Edit button. 
10. On the Library Path Item Options dialog, for Link Type, choose External. 
11. On the Library Path Item Options dialog, click OK. 
12. On the Properties dialog, click OK.

You might have thought that would fix it, but no, the error persists doggedly.

What might be next?

Charlie ...

@quocuy

This comment has been minimized.

Show comment Hide comment
@quocuy

quocuy May 25, 2015

Thanks!

quocuy commented May 25, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment