Anonymous
public text v1 · immutablethis.onMouseDown = function() {
pressed = true;
box._x = _xmouse;
box._y = _ymouse;
box._width = box._height=0;
startXPos = _xmouse;
startYPos = _ymouse;
};
this.onMouseMove = function() {
if (pressed) {
breite = _xmouse-startXPos;
hoehe = _ymouse-startYPos;
box._width = breite;
box._height = hoehe;
}
};
this.onMouseUp = function() {
pressed = false;
};