Thanks for the response, André!

The problem with replacing the for-loop with an interval is that the array
graph_coordinates contains plenty of data both before and after the segment
that is to be visualized. Thus, if the delay is, say, 500ms per loop, there
will be several seconds of delay both before and after that graph is drawn. 

If use of an interval is the only solution (why doesn't a while-loop work as
in my initial example?), I may have to pre-process the data into a temp
array that'll contain only the segment of data to be graphed, and then pass
the data to the interval.

Ville


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of André
Goliath
Sent: Saturday, June 10, 2006 01:50
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Slowing down the action (problem with a pause)

I can´t see your problem using an Interval here.
In fact I don´t think there is any way around an Interval or onEnterFrame
loop if you want
to achieve a "drawing effect".

First get rid of the For-Loop, thats what gets replaced by the interval.
Then make sure you pass all neccessary parameters to the interval.
That are all parameters that do not get changed during the calls.
Finaly, make graph_coordinates an static/otherwise "global" array and pop
out one
coordinate on every call of the interval. On every interval step you process
only this single coordinate.
If your array is empty, clear the interval.

hth


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to