
Код:
Xb = 0;
Yb = 0;
p = 0;
this.createEmptyMovieClip("bg", 100);
with (this.bg) {
beginFill(0xFFFFFF, 0);
moveTo(0, 0);
lineTo(Stage.width, 0);
lineTo(Stage.width, Stage.height);
lineTo(0, Stage.height);
lineTo(0, 0);
endFill;
}
this.bg.useHandCursor = 0;
this.bg.onRollOver = function() {
p = 1;
};
this.bg.onRollOut = function() {
p = 0;
};
lineStyle(15, 0x000000, 100);
function ris() {
if (Key.isDown(1) && p == 1) {
moveTo(Xb, Yb);
lineTo(_root._xmouse, _root._ymouse);
Xb = _root._xmouse;
Yb = _root._ymouse;
}
}
this.onMouseDown = function() {
Xb = _root._xmouse;
Yb = _root._ymouse;
};
setInterval(ris, 1);