Hello,
is possible to make a wait or sleep (like java) to stop a code
execution and after n seconds return to execute?
Not directly, but you can create the same functionality with setInterval()
Danny
___
Flashcoders@chattyfig.figleaf.com
To change
http://proto.layer51.com/d.aspx?f=454
On Mar 21, 2006, at 4:13 PM, Danny Kodicek wrote:
Using setInterval, I can only call a method (or funciton) same time
later. I can't continue to run from the same point, at same function.
Exist another solution for this?
Yes, put your remaining code
Using setInterval, I can only call a method (or funciton) same time
later. I can't continue to run from the same point, at same function.
Exist another solution for this?
Schramm
Danny Kodicek wrote:
Hello,
is possible to make a wait or sleep (like java) to stop a code
execution and after n
you don't need a wait, the way you are doing its correct, except for the
order
mclip.onLoad()
{
continue();
}
mclip.loadMovie();
if you end your code right after the loadmovie it will continue on the
onLoad.
cheers
GaB.
___
If you are inside a loop, and need to wait you have a big problem!
I would like a semaphore for syncronization. :-\
The Adobe/Macromedia must put this on Flash. (AS) :'( .
Danny, thanks for you help! ;-)
Rodrigo Schramm
Danny Kodicek wrote:
Using setInterval, I can only call a method
I believe the effect of a wait() function in Flash would cause an
application to freeze/hang. Actionscript is a single threaded language, I
don't even think a wait() type function could be implemented with sufficient
practicality. Wouldn't it just stop the entire thread from executing any
further,
Using setInterval, I can only call a method (or funciton) same time
later. I can't continue to run from the same point, at same function.
Exist another solution for this?
Yes, put your remaining code into a separate function:
id=setInterval(function(){myRemainingCode},2000)
You can
Wouldn't it just stop the entire thread from executing any further,
then resume it, leaving the state of the application
identical to the state it was in prior to calling the wait()
function?
Yes, but this would be very handy to free up CPU cycles to allow other
processes to execute. I'm
F8 has addressed some of those concerns - and AS3/FP8.5 looks to make major
improvements. Your C++ co-workers are just jealous that you're having fun :)
On 3/21/06, Mike Mountain [EMAIL PROTECTED] wrote:
Wouldn't it just stop the entire thread from executing any further,
then resume it,
yes, we did a recent benchmark for a client that requires some real power,
running the same set of arithmetic calculations this is what we discovered:
as2 finished executing the code in approximately 20 seconds
Java finished executing the code, in 3 renditions, 1422/ 1402/ 1438
milliseconds
To: Flashcoders mailing list
Cc:
Subject: Re: [Flashcoders] wait or sleep
http://proto.layer51.com/d.aspx?f=454
On Mar 21, 2006, at 4:13 PM, Danny Kodicek wrote:
Using setInterval, I can only
manager to load the next item
33.
this._parent.loadManager.resume();
34.
}
35.
}
-Original Message-
From: [EMAIL PROTECTED] on behalf of iashido
Sent: Tue 3/21/2006 7:16 AM
To: Flashcoders mailing list
Cc:
Subject: Re: [Flashcoders] wait or sleep
12 matches
Mail list logo