AS3 Test case #7 "CRASH" 0.71

Bug #1126279 reported by zahurdias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Lightspark
Confirmed
Medium
Unassigned

Bug Description

package {
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;

    [SWF(width=465, height=465, backgroundColor=0x000000, frameRate=24)]
    public class ColorTrans extends MovieClip {

        private var bmd:BitmapData;

        public function ColorTrans() {
            bmd = new BitmapData(465, 465);
            addChild(new Bitmap(bmd));
            addEventListener(Event.ENTER_FRAME, enterFrameHandler);
        }

        private function enterFrameHandler(e:Event):void{
            var rect:Rectangle = bmd.rect;
            var ct:* = new ColorTransform (1, 1, 1, 0.9);
            bmd.colorTransform(rect, ct);
            var color:uint = 0xFFFF0000;
            var fillR:Rectangle = new Rectangle(465*Math.random(), 465*Math.random(), 20, 20);
            bmd.fillRect(fillR, color);
        }
    }
}

Revision history for this message
Antti Ajanki (aajanki) wrote :

It doesn't crash with the current git. I guess that the crash was due to a bug in bounds checking in fillRect. That bug was fixed by commit 8d08db55.

The output is, however, wrong (the rectangles stay on the screen instead of fading), because BitmapData does not support ColorTransform.

Changed in lightspark:
importance: Undecided → Medium
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.