These mods to my AFLAX library look interesting. To summarize what he did, he uses Rhino (open source _javascript_ interpreter) to be able to run my AFLAX library against the Flash player all within a Java desktop application.

 

Keep up the good work!

 

Paul Colton

www.aflax.org

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Gong
Sent: Tuesday, December 06, 2005 12:12 AM
To: [EMAIL PROTECTED]; Open Source Flash Mailing List
Subject: [osflash] An Aflax Javaflash Integration Demo

 

Hi all,
I have just made an interesting Aflax Javaflash integration demo. Thanks to the power of Rhino, I didn't do any extra work to enable this. :-)
The demo is on the trunk in http://dctc.sjtu.edu.cn:81/svn/wonder/trunk/javaflash/src/java/sjtu/dctc/wonder/javaflash/demo/AflaxDemo.java

Some modifications to Aflax are needed to in order to make it work in Javaflash:

Firstly, the original Aflax library 0.33 uses 'callback' parameter in url to decide the callback but it does not work locally, so we sticked the callback to 'main'. This needs to modify aflax.as and we have provided a modified version of swf in http://dctc.sjtu.edu.cn:81/svn/wonder/trunk/javaflash/misc/Aflax-JF.swf and the diff of as in http://dctc.sjtu.edu.cn:81/svn/wonder/trunk/javaflash/misc/aflax.as.diff

Secondly, you need to modify the callback name in examples to 'main' which in some cases was 'go'.

Finally, you need to copy aflax.js into $JAVAFLASH_HOME/misc
The main class needs one parameter for the location of your js file. For example, the example 'drawing2' of Aflax has a js file 'drawing2.js'. You need to copy the drawing2.js somewhere, modify it and set up the location of it to the parameter.

You are done here. But that will be more. You can add Java calls to JS now. Enjoy! ;-)

NOTICE: Examples that use extra js libs and HTML DOM methods are not supported in Javaflash and those examples may not work properly. If you want to run the video example, you need to copy the flv file to a location and modify the path in JS to be relative to the location of Aflax-JF.swf.

--
Best Regards
Steven Gong

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to