The answer to your question is really a question: Can you think of any
reason you should be using Sprites. If you are going to want to click on
the rectangles, move them, or swap depths, Sprites might make that easier.
If they're just going to be drawn and then never change, then using Sprites
adds memory and processing overhead for no reason. Without knowing more on
how the rectangles are going to be used, I can't say more than that.
- Dan
On 12/1/06, arpan srivastava <[EMAIL PROTECTED]> wrote:
Hi,
I have to draw 5 rectangle inside a class extending UIComponent. I
have done this :
// Draw first base rectangle
g.beginFill(baseRectColor1);
g.drawRect(0,baseY,bRW1,baseRectHeight);
g.endFill();
// Draw second base rectangle
g.beginFill(baseRectColor2);
g.drawRect(bRW1,baseY,bRW2,baseRectHeight);
g.endFill();
// Draw third base rectangle
g.beginFill(baseRectColor3);
g.drawRect(bRW2 + bRW1,baseY,bRW3,baseRectHeight);
g.endFill();
is this approach ok or should I create new sprite object for each
rectangle and add it to the class. ?
------------------------------
Everyone is raving about the all-new Yahoo! Mail
beta.<http://us.rd.yahoo.com/evt=42297/*http://advision.webevents.yahoo.com/mailbeta>