开发者

Is there a way to compile JavaScript into ActionScript?

I've created a JavaScript library that I'd like to make accessible to the Flash community via ActionScript.

The thing to note is that my JavaScript is not for the UI. It's an object oriented data access library. Therefore, the library doesn't do anything with the DOM. Think of it as almost a pure JavaScript library.

I know that ActionScript is based upon ECMAScript. I'm hoping there are some tools out there that will enable me to just compile over to ActionScript.

I'd really appreciate开发者_运维百科 it if anyone had any ideas/advice on this.


You might get some leverage out of using ExternalInterface if your target platform is the browser:

http://kb2.adobe.com/cps/156/tn_15683.html

I don't know of any specific way to compile your code into AS3 though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜