Section 1
//brush_mc_2 (eraserwm_fla.brush_mc_2)
package eraserwm_fla {
import flash.display.*;
public dynamic class brush_mc_2 extends MovieClip {
public var brush_mc:MovieClip;
}
}//package eraserwm_fla
Section 2
//MainTimeline (eraserwm_fla.MainTimeline)
package eraserwm_fla {
import flash.events.*;
import flash.display.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var mc1:MovieClip;
public var brush_mc:MovieClip;
public var mask_mc:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1);
}
public function brushDown(_arg1:MouseEvent):void{
_arg1.currentTarget.startDrag();
MovieClip(_arg1.currentTarget).addEventListener(Event.ENTER_FRAME, erase);
mask_mc.graphics.moveTo(brush_mc.x, brush_mc.y);
}
function frame1(){
mask_mc = new MovieClip();
addChild(mask_mc);
mc1.mask = mask_mc;
brush_mc.addEventListener(MouseEvent.MOUSE_DOWN, brushDown);
brush_mc.addEventListener(MouseEvent.MOUSE_UP, brushUp);
}
public function brushUp(_arg1:MouseEvent):void{
_arg1.currentTarget.stopDrag();
MovieClip(_arg1.currentTarget).removeEventListener(Event.ENTER_FRAME, erase);
}
public function erase(_arg1:Event):void{
var e = _arg1;
var _local3 = mask_mc.graphics;
with (_local3) {
beginFill(0);
drawRect(brush_mc.x, brush_mc.y, brush_mc.width, brush_mc.height);
endFill();
};
}
}
}//package eraserwm_fla