here is some action scripts for you all...
Make a character make it a movie clip and give it an instance name "character" withought the " Then make a rectangle and give it an instance name "ground" without the " and put this script in the character.
onClipEvent (load) { moveSpeed = 10;}onClipEvent (enterFrame) { if (Key.isDown(Key.RIGHT)) { this._x += moveSpeed; } else if (Key.isDown(Key.UP)) { this._y -= 0; } else if (Key.isDown(Key.DOWN) && !fall) { this._y += 0; } else if (Key.isDown(Key.LEFT)) { this._x -= moveSpeed; }}onClipEvent (enterFrame) { if (Key.isDown(Key.SPACE) && !jumping) { vel_y = 36; jumping = true; } if (jumping == true) { vel_y -= 2; if (vel_y<=-15) { vel_y = -15; } this._y -= vel_y; } if (_root.ground.hitTest(this._x, this._y+35, true)) { vel_y = 0; jumping = false; }}onClipEvent (enterFrame) { this._y += 16; if (_root.ground.hitTest(this._x, this._y+1, true)) { this._y -= 16; }}
That will make your character fall to the ground and you can move left and right with the arrow keys and jump with the space bar.
Ok, here is another helpful scripts, this makes your character shrink as he moves. Just put this whole script in the character.
onClipEvent (load) {
//
moveSpeed = 10;
srinkSize = 2;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x += moveSpeed;
// Move Right
} else if (Key.isDown(Key.UP)) {
this._y -= moveSpeed;
this._height -= srinkSize;
this._width -= srinkSize;
// Move Up
} else if (Key.isDown(Key.DOWN)) {
this._y += moveSpeed;
this._height += srinkSize;
this._width += srinkSize;
// Move Down
} else if (Key.isDown(Key.LEFT)) {
this._x -= moveSpeed;
// Move Left
}
}
Here is another script, put this on a movieclip, this script makes a custom cursor i would draw a big hand for a cursor. Put this script in it.
onClipEvent (load) { startDrag ("", true); Mouse.hide();}
Enjoy my scripts!
Well some one else put some action scripts or sumthin.
