Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onClipEvent (load) {
- var hiz:Number = 5;
- var Yukseklik:Number = _height/2;
- var Yataylik:Number = _width/2;
- }
- onClipEvent (enterFrame) {
- while (_root.mcDuvar.hitTest(this._x, this._y-Yukseklik, true)) {
- _y += hiz;
- }
- while (_root.mcDuvar.hitTest(this._x, this._y+Yukseklik, true)) {
- _y -= hiz;
- }
- while (_root.mcDuvar.hitTest(this._x+Yataylik, this._y, true)) {
- _x -= hiz;
- }
- while (_root.mcDuvar.hitTest(this._x-Yataylik, this._y, true)) {
- _x += hiz;
- }
- if (Key.isDown(Key.UP)) {
- _y -= hiz;
- }
- if (Key.isDown(Key.DOWN)) {
- _y += hiz;
- }
- if (Key.isDown(Key.RIGHT)) {
- _x += hiz;
- }
- if (Key.isDown(Key.LEFT)) {
- _x -= hiz;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment