it doesnt come up with an error… but it is one
onClipEvent (load) {
gravity = 10;
scale = _xscale;
walkSpeed = 0;
maxjump = 6;
}
onClipEvent (enterFrame) {
if (air == true) {
_y += gravity;
state = 3;
}
if (Key.isDown(Key.LEFT) && !_root.leftbound.hitTest(_x, _y, true)) {
_x -= walkSpeed;
_xscale = -scale;
}
if (Key.isDown(Key.RIGHT) && !_root.rightbound.hitTest(_x, _y, true)) {
_x += walkSpeed;
_xscale = scale;
}
if (_root.platforms.hitTest(_x, _y, true)) {
air = false;
_y -= gravity;
} else {
air = true;
}
if (Key.isDown(Key.UP) && jump == true) {
_y -= jumpSpeed;
}
if (air == false) {
jump = true;
jumpcount = 0;
jumpSpeed = 22;
}
if (Key.isDown(Key.UP)) {
jumpcount += 1;
}
if (jumpcount>maxjump && jumpSpeed>-2) {
jumpSpeed -= 2;
}
if (air == false && !Key.isDown(Key.LEFT) && !Key.isDown(65) && _currentframe<4 or air == false && !Key.isDown(Key.RIGHT) && !Key.isDown(65) && _currentframe<4) {
state = 1;
}
if (Key.isDown(Key.LEFT) && air == false && !Key.isDown(65) && _currentframe<4 or Key.isDown(Key.RIGHT) && air == false && !Key.isDown(65) && _currentframe<4) {
state = 2;
}
if (!Key.isDown(65)) {
gotoAndStop(state);
}
_root.statetxt = state;
}
onClipEvent (keyUp) {
if (Key.getCode() == 83) {
jump = false;
}
}
onClipEvent (enterFrame) {
if (air == true) {
if (Key.isDown(88)) {
gotoAndStop(6);
}
}
else {
if(Key.isDown(88)) {
gotoAndStop(4)
}
}
}
near the end were
onClipEvent (enterFrame) {
if (air == true) {
if (Key.isDown(88)) {
gotoAndStop(6);
}
}
else {
if(Key.isDown(88)) {
gotoAndStop(4)
}
}
}
that is it keeps messing up… as in when the key is press in the air… then it just stops at the frame and doesnt play the animation…
and if it is pressed on the ground it plays through the whole hero movie clip… please help!!
thnx in advance… il get my .fla soon cant find a good host…