Sugan S
Sugan S

Reputation: 1778

Multithreading in Actionscript 3

Is there any way to do multithreading in Actionscript3.

Upvotes: 0

Views: 9121

Answers (6)

MasterPlanMan
MasterPlanMan

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

renaun
renaun

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

marceloduende
marceloduende

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

Daniel MesSer
Daniel MesSer

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:

  • ActionScript workers (enables concurrent ActionScript execution on separate threads)
  • Support for advanced profiling
  • Support for more hardware-accelerated video cards (from 2005/2006) in order to expand availability of hardware accelerated content
  • Improved ActionScript performance when targeting Apple iOS
  • Performance index API to inform about performance capabilities of current environment
  • Release outside mouse event API
  • ActionScript 3 APIs to access the fast-memory opcodes (premium feature when used in conjunction with Stage3D APIs)

Upvotes: 2

avanderw
avanderw

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

Marty
Marty

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

Related Questions