AS3 Raycaster - IE performace issues

[FONT=Courier New]I’m developing a custom ray caster in AS3. Recently, I’ve been focusing on speed optimizations. I typically test in Firefox, however I’ve noticed the methods I’m currently using absolutely kill performance in IE7 Vista and IE7 XP Pro. I’m assuming it’d be about the same in IE6. Has anyone else encountered this issue? Hopefully there’s some better method than what I’m using right now to redraw the screen several times per second.

Here’s an example of the method I’m using to display pixels:


var i:int;
var j:int;
var color:uint;
var sw:int=stage.stageWidth;
var sh:int=stage.stageHeight
var bmd:BitmapData=new BitmapData(sw,sh,false,0);
var bmp:Bitmap=new Bitmap(bmd);
stage.addChild(bmp);
stage.addEventListener(Event.ENTER_FRAME,process);
function process(e:Event):void{
    for(i=0; i<sw; ++i){
        for(j=0; j<sh; ++j){
           bmd.setPixel(i,j,color);
        }
    }
}

…where color = getPixel() call from another BitmapData.

See my most current working example here:

http://peaceoutside.org/3d.php

Even though there’s a start button, you have to click the flash again to gain focus for keyboard events for some reason.

In Internet Explorer, the FPS seem to be about the same as Firefox, but the actual redraw rate is complete crap. Basically completely unusable.

Anyone else have this problem? Any known workarounds or fixes? Is there a faster way to update a bitmap several times per second?

:ninja:
[/FONT]