Rabid_Badger has yet another nice modification!
This one is for moving the character, so he/she has a walking animation, and so he/she can attack.
First off, in your character (the movieclip) make 6 frames, each one with an exact copy of the character.
All of these copies must be movieclips too.
(still inside the movieclip)
In Frame 1
Have your character facing right.
In Frame 2
Have your character walking right.
In Frame 3
Have your character facing left.
In Frame 4
Have your character walking left.
In Frame 5
Have your character attacking, while facing right.
In Frame 6
Have your character attacking, while facing left.
Now, leave the movieclip, and go into your character's actionscript (press F9 whilst you have it selected) and find this:
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_x -= speed;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
}
}
One you have, copy and paste this script BELOW it:
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
if (Key.isDown(17)) {
_root.moving_2="left"
} else {
_root.moving_2=""
}
_root.moving="left"
if(fall == true) {
if(_root.moving_2=="left") {
_root.circle.gotoAndStop(1)
} else {
_root.circle.gotoAndStop(3)
}
} else {
if (Key.isDown(90)) {
if(_root.moving=="right") {
if(_root.moving_2=="left") {
_root.circle.gotoAndStop(5)
} else {
_root.circle.gotoAndStop(6)
}
}
if(_root.moving=="left") {
_root.circle.gotoAndStop(6)
}
}
if(_root.moving_2 == "left") {
_root.circle.gotoAndStop(2)
} else {
_root.circle.gotoAndStop(4)
}
}
} else {
if(_root.moving=="left") {
if (Key.isDown(90)) {
if(_root.moving_2=="left") {
_root.circle.gotoAndStop(5)
} else {
_root.circle.gotoAndStop(6)
}
} else {
if(_root.moving_2=="left") {
_root.circle.gotoAndStop(1)
} else {
_root.circle.gotoAndStop(3)
}
}
}
if (Key.isDown(Key.RIGHT)) {
if (Key.isDown(17)) {
_root.moving_2="right"
} else {
_root.moving_2=""
}
_root.moving="right"
if(fall == true) {
if(_root.moving_2=="right") {
_root.circle.gotoAndStop(3)
} else {
_root.circle.gotoAndStop(1)
}
} else {
if(_root.moving_2=="right") {
_root.circle.gotoAndStop(4)
} else {
_root.circle.gotoAndStop(2)
}
}
} else {
if(_root.moving=="right") {
if (Key.isDown(90)) {
if(_root.moving_2=="right") {
_root.circle.gotoAndStop(6)
} else {
_root.circle.gotoAndStop(5)
}
} else {
if(_root.moving_2=="right") {
_root.circle.gotoAndStop(3)
} else {
_root.circle.gotoAndStop(1)
}
}
}
}
}
}
Hope it works for you.
If something doesn't work, tell me what went wrong, and I'll help you.
(Note: this script also allows for the character to be moving left/right without changing the way he/she is facing, this is done by holding CTRL+Arrowkeys)