all groups > flash actionscript > april 2005 >
You're in the

flash actionscript

group:

Threading in AS 2.0


Threading in AS 2.0 Billy Porter
4/23/2005 4:31:18 PM
flash actionscript:
Anyone got a nice AS 2.0 Threading class at hand? I guess it should be
possible to rite one using setInterval.

Any help would be greatly appreciated.

Re: Threading in AS 2.0 Jeckyl
4/24/2005 12:00:00 AM
What exactly would you expect this to do. Threading doesn't make a lot of
sense in Flash as everything happens in short bursts when events (like
button press, or reaching a frame or interval firing) etc happen, and code
cannot be long in processing (due to player limits). So you can't really
have anything that is running anywhere near long enough to require any
threading.
--
Jeckyl

Re: Threading in AS 2.0 Billy Porter
4/27/2005 12:00:00 AM
Well if it wasn't for threading we would not be able to respond to an event
(such as a button being pressed) while showing an animation at the same
time. Threading is already there but as far as I know it is not exposed to
us through a clean API as it is in many other programming languages. It
would be great to have a Thread class such as the one in Java and C# etc.

[quoted text, click to view]

Re: Threading in AS 2.0 Jeckyl
4/27/2005 12:00:00 AM
There is not actual threading in the player .. it doesn't need it. It just
responds to events as they come from the event queue .. and things never
happen simultaneously .. its all linear (no need to make your script thread
safe, for instance)

But why on earth would you need a threading class anyway .. it makes no
sense for a Flash app. As its not possible for things to happen
simultaneously, you don't need threading to manage it.
--
All the best
Jeckyl

Re: Threading in AS 2.0 Travis Newbury
4/27/2005 9:35:27 PM
[quoted text, click to view]

Isn't that what threading is all about? Making things happen
simultaneously? So which came first?

The fact that things can not happen at the same time, or that there is
not a threading class?

Mind you I am not disagreeing with you, only pointing out the paradox

--
AddThis Social Bookmark Button