
onClipEvent (enterFrame) {
sd = 20;
if (Key.isDown(67)) {
sd = 28;
} else {
sd = 12;
}
if (Key.isDown(Key.UP) && (Key.isDown(Key.RIGHT))) {
this.gotoAndStop("w");
}
if (Key.isDown(88)) {
sd = 0;
}
if (Key.isDown(Key.UP)) {
if (_root.bigmap.bigmap2.map.hitTest(_x, _y-sd, true)) {
_root.bigmap.bigmap2._y += sd;
_root.w._y += sd;
this.gotoAndStop("w");
}
}
if (Key.isDown(Key.DOWN)) {
if (_root._root.bigmap.bigmap2.map.hitTest(_x, _y+sd, true)) {
_root.bigmap.bigmap2._y -= sd;
_root.w._y -= sd;
this.gotoAndStop("s");
}
}
if (Key.isDown(Key.LEFT)) {
if (_root.bigmap.bigmap2.map.hitTest(_x-sd, _y, true)) {
_root.bigmap.bigmap2._x += sd;
_root.w._x += sd;
this.gotoAndStop("a");
}
}
if (Key.isDown(Key.RIGHT)) {
if (_root.bigmap.bigmap2.map.hitTest(_x+sd, _y, true)) {
_root.bigmap.bigmap2._x -= sd;
_root.w._x -= sd;
this.gotoAndStop("d");
}
}
if ((Key.isDown(Key.RIGHT)) && (Key.isDown(Key.UP))) {
if (_root.bigmap.bigmap2.map.hitTest(_x+sd, _y, true)) {
_root.bigmap.bigmap2._x -= sd;
_root.w._x -= sd;
this.gotoAndStop("d");
}
}
}