Reputation: 87401
I have some data-crunching code implemented in ActionScript, and I'd like to call it from JavaScript. The related question Interacting with actionscript 3.0 using javascript mentions the blog post http://blog.circlecube.com/2008/02/01/actionscript-javascript-communication/ which tells me how to do this. All I need now is generating the SWF file from the .as
file completely automatically, with a comand-line tool on Linux. How is this possible?
Is there a speed difference between AS2 and AS3?
Upvotes: 1
Views: 993
Reputation: 3314
As the others have said yes AS3 is faster than AS2. There are a few other ways to squeeze more performance. One way is pixel bender which you can consider like writing a PixelShader for a GPU except here it is being calculated in software and not hardware. Also Alchemy has shown to improve some performance. Check out http://blog.joa-ebert.com/ The performance Joa is able to gain with various optimisations (some by optimising the byte code) is awesome.
I think this is the article but I am at work so I can not verify. http://blog.joa-ebert.com/2009/04/03/massive-amounts-of-3d-particles-without-alchemy-and-pixelbender/
Upvotes: 1
Reputation: 87401
Answering my own question, AS3 can be up to 4 times faster than AS2 for number crunching (depending on the code tested), and Flash Player 10 is faster than Flash Player 9, especially Vector.<int>
is much faster than Array
.
I've summarized automatic SWF generation from AS2 and AS3 sources in my blog post: http://ptspts.blogspot.com/2009/10/how-to-create-actionscript-3-as3-flash.html. I had to collect information for that from dozens of web sites.
Upvotes: 2
Reputation: 6127
"Is there a speed difference between AS2 and AS3?"
Yes, there is a huge difference, AS3 is much faster, especially in "data-crunching" and such operations, that you mention.
Upvotes: 3
Reputation: 10665
Get the free Flex SDK if you are using as3. (Use mtasc if you are using as2)
Upvotes: 3