Hi,

It's been a while since I've used Flash, and so I'm still stuck in the past trying to get comfortable with AS2.0 again. I'm trying to find out how to scale a bitmap image through ActionScript, but since AS3.0 is so dominant I cant find anything useful through google.

Basically, I'm trying to keep things as dynamic as possible, and so I'd like to use random sizes for my objects (in a game). I've found that to keep the framerate high I'll need to copypixel my objects onto screen, and then wipe them (with fillRect) every frame. This has worked like a charm, but I see no easy way to have objects of varing sizes without manually drawing differently sized 'reference bitmaps', which will take a long time (hence, i'd rather AS do this on start-up)!!

Instead of the above method, I've read in some old threads where Iopred and some of the other oldies were talking about copyPixel'ing into movieclips and doing everything normally (ie. use _xscale/_yscale) but I don't understand how that would work???

Here's a code snippet, if it helps
PHP Code:
_root.onEnterFrame = function():Void {
    
add 0;                            // target frame (value = standard/rest frame);
    
_root.bmp.fillRect(stageRect0);
    for (var 
0allBalls.lengthi++) {
        
//enterFrame () for balls
         
var allBalls[i];
            
b.lSpan++
            
b.+= Math.sin((b.lSpan-b.y*5) / 100);
            if(
b.y<Stage.height) {
                
b.+= 1;
            } else {
                
b.= -50;
            }
        if (
b.lSpan%fR==0) {                        //change frame (move contents) frame-rate (40)/fR
            
if (_root.add==0) {
                if (
b.frame 20) {
                    
b.frame++;
                } else if (
b.frame 20) {
                    
b.frame--;
                }
            } else {
                
b.frame +=Math.round((_root.add-b.frame)*.5);                        
            }
        }
            
b.rect.b.frame 55;        //55 = width of frame
            
_root.bmp.copyPixels(myBitmapDatab.rect, new Point(b.x,b.y), nullnulltrue);
    
//    }
    
}
}; 
Thanks for any help...