RE: [flexcoders] What is the best way to draw about 10,000 to 15,000 rectangles?

2007-02-01 Thread Roger Gonzalez
Sent: Thursday, February 01, 2007 4:23 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] What is the best way to draw about 10,000 to 15,000 rectangles? > adding all of them to the display list takes so long and is just too much

RE: [flexcoders] What is the best way to draw about 10,000 to 15,000 rectangles?

2007-02-01 Thread Gordon Smith
> adding all of them to the display list takes so long and is just too much What kind of time are you seeing? I was able to add 10,000 UIComponents as children in about 10 seconds. And I was able to add 10,000 Sprites as "raw" children (using rawChildren.addChild()) in about 2 seconds. How fas

Re: [flexcoders] What is the best way to draw about 10,000 to 15,000 rectangles?

2007-02-01 Thread Daniel Freiman
Assuming the locations are all in some data structure, i'd say keep that structure and just iterate through each item and draw them on a single canvas using the Graphics class/object. Then register a mouse listener for the entire canvas and calculate which container you clicked on based on the x