CanvasScript3
>
Tests
> BitmapData - FloodFill
Code
var stage = new Stage("canvas", 420, 500, 30); var loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e) { var bitmap = loader.content; var bitmapdata = bitmap.bitmapData; stage.addEventListener(MouseEvent.CLICK, function(e) { bitmapdata.floodFill(stage.mouseX, stage.mouseY, 0xFF00FF00); }); }); loader.load(new URLRequest('img/floodfilltest.gif')); stage.addChild(loader);
Canvas
Output