all groups > flash actionscript > october 2006 >
You're in the

flash actionscript

group:

JSON and Actionscript



Re: JSON and Actionscript SMB
10/16/2006 4:41:00 PM
flash actionscript:
[quoted text, click to view]

This is a Class so you will want to import the class, not #include the code
since Classes must be defined in external .as files.

so you want...
import JSON;
if JSON.as is in the same directory as your fla.

If your JSON.as is in a directory called as that is in the same directory as
your fla then you need to change two things...
1. change to
import as.JSON;
2. change line 34 of JSON.as to
class as.JSON {

HTH

JSON and Actionscript Crandom
10/16/2006 8:39:20 PM
I am trying to implement JSON into Flash Actionscript. I have found the script
that allows this from http://json.org/ (found here:
http://www.theorganization.net/work/jos/JSON.as) in the form of a
[b]Actionscipt Class[/b].

I tried to include this class with:

[i]#include "JSON.as"[/i]

but it returns this error on running:

[i]**Error** JSON.as: Line 34: Classes may only be defined in external
ActionScript 2.0 class scripts.
class JSON {

Total ActionScript Errors: 1 Reported Errors: 1[/i]

[u]I thought that it is an external class and i am merely using
[i]#include[/i] to be able to use it.[/u]

Am i doing something wrong? Or is ther some other way to activate a class?
Re: JSON and Actionscript coldMiner
10/16/2006 9:56:38 PM
place the .as file in a sub folder, example:
Re: JSON and Actionscript Crandom
10/17/2006 12:00:00 AM
Re: JSON and Actionscript SMB
10/17/2006 8:23:07 AM

[quoted text, click to view]

Welcome.

AddThis Social Bookmark Button