Any feedback?
Ronald Villaver <[EMAIL PROTECTED]> wrote: Hi Everyone,
Wow It's been a while, since I posted. Anyway Last time I looked(which is just
minutes ago), I still can't find a way do have real "eval" functions in flash,
correct me if I'm wrong. So I have a new project, its called JXN, short for
JSON eXtended Notation. Its a parsing engine, that enhances the JSON engine's
unmarshalling capabilities to understand function calls.
Ex. {
"author":"rvillaver",
"pseudoFunction":task([
set("myVar",1234),
set("testObj",create("Object")),
set("testObj.testValue",
add(
get("myVar"),
get("fooBar")
)
),
result(
get("testObj.testValue")
)
])
}
To parse it:
JXN.installPlugin("",JXN.plugins.MacroPlugin);
var context = new Object();
context.fooBar = 10;
JXN.load("./test.jxn",context,{
onResult:function(evt){
var output = evt.result.pseudoFunction.run();
//output evaluates to 1244
}
});
Its now hosted in sourceforge, jxn.sourceforge.net. The first release is JXN
for Actionscript. It allows some minimal "macro" like scripting for flash. A
small answer for Actionscript's lack of good eval functions. Read more on how
to use and make your own plugins in the website. We would be releasing next a
version for Javascript(although js does'nt really need it, but the custom
plugin feature would be nice, so data can be reactant to context variables).
Java port, C# port and others. I'm still waiting for my SVN on sourceforge to
activate, so I can formally organize the source codes. But the release already
has a copy of the fla, and all the source files needed for your perusal. This
script is done in Flash 6 Class style to provide larger support, allowing maybe
even Flash 5 to do the dynamic scripting.
Dear OSFlash.org admins, how do I enroll to be part of your project listing. So
we can promote this project into the community. Currently its at version 0.7
mainly due to the amount I want to test it more. But features wise its good to
go. Just a note, I'm not changing the JSON format or making a new one, I'm
just enhancing the engine and making a plugin framework to facilitate the
parser in handling more features of its mother language.
Hope you guys like it.
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta._______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org
---------------------------------
Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut._______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org