Reputation: 1778
Is there any way to do multithreading in Actionscript3.
Upvotes: 0
Views: 9121
Reputation: 1032
This is not the case anymore, might as well update this post. See the Worker class (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Worker.html)
Here's a tutorial I found online: http://esdot.ca/site/2012/intro-to-as3-workers-hello-world
Upvotes: 3
Reputation: 161
With the release of Flash Player 11.4 and AIR 3.4 there is a new concurrency API with Worker class.
There is a video tutorial on Workers here.
You might also be interested in the AS3-Workers-Compat library that has examples of how to use Workers in a way that is compatible with older versions of Flash Player.
Upvotes: 7
Reputation: 719
It WASN'T, now we have the Actionscript Workers which is the concurrency with actionscript 3. Multi thread in another words... It is available for AIR/Mobile only for now. http://www.yeahbutisitflash.com/?p=4368
Upvotes: 1
Reputation: 1181
As of today, NO, as of later this year, probably, yes:
http://www.adobe.com/devnet/flashplatform/whitepapers/roadmap.html
Flash Player "Dolores" Adobe is planning an additional Flash Player release in the second half of 2012. Code-named "Dolores", this release focuses on enabling features and functionality for the gaming market, as well as improvements for general Flash Player use cases.
Some of the features planned for this release include the following:
Upvotes: 2
Reputation: 675
The simple answer is no, but if you can translate your problem into the texture domain and run a shader (pixel bender) on it and process the results back to your problem domain... Then you could achieve a paralleled execution on the graphics card, but AS3 otherwise only simulates multithreading by giving the highest priority method execution time after each successful method execution.
Upvotes: 0
Reputation: 39466
No, there is no multi-treading in ActionScript 3.
You need to write your own code to at best 'fake' threading.
Upvotes: 2