but the most problem is for loop i think flash dont do any thing until the loop 
finishde
i need to  use smal step because if the step is big the graph will be show like 
line to line , it s ugly graph
and the distance that i use for loop is more importatnt for me i want to show 
2*10^8 distance / i want to make point in my program and plot it one by one i 
make i plot
i make i plot 
is there better way?


--- On Mon, 8/22/11, Gerry Beauregard <gerry.beaureg...@sonoport.com> wrote:

From: Gerry Beauregard <gerry.beaureg...@sonoport.com>
Subject: Re: [Flashcoders] array problem,loop.plot
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Date: Monday, August 22, 2011, 4:31 AM

On 2011-08-22  , at 16:06 , nasim hhhhh wrote:

> for( var i:Number= -10000 ;i<10000;i+=.001) { arr[i]=new object() arr[i].x=i
> arr[i].y=5*Math.sin(20*i);
> functiononlinedraw()
> }

Perhaps the problem is simply that you're trying to plot too many points.  If 
you're stepping from -10000 to +10000 in increments of 0.001, that's 20 million 
points.  Plotting 20 million points of a sine function seems a little futile…

I suggest you try a smaller range and bigger increment first, just to see 
whether the code's basically working, e.g. go from -100 to +100 in steps of 0.1.

If speed and space are issues, try using two vectors of Numbers, one for the x 
values, the other for the y values. 

-Gerry
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to