Urgh! I have problems GALORE!!!
First off, see my game and then answer the questions below.
http://img480.images..mariovsbowser6bz.swf
0
Problem #1: The walking animation only limits me to one frame of animation. In the first frame of the character animation has him standing, in the second one has a picture of him walking, the third has the actionscript gotoAndPlay(1), and the fourth has him jumping.
How should the actionscript below be edited so I can add more frames of a walking animation between frame 2 and 3?
onClipEvent (load) {
fall = false;
_name = "circle";
jump = 0;
speed = 6;
jumpheight = 7;
maxfall = -54;
}
onClipEvent (enterFrame) {
xmin = getBounds(_root).xMin;
xmax = getBounds(_root).xMax;
ymin = getBounds(_root).yMin;
ymax = getBounds(_root).yMax;
if (Key.isDown(Key.LEFT)) {
_x -= speed;
this.gotoAndPlay(2);
this._xscale = -100;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
this.gotoAndPlay(2);
this._xscale = 100;
}
if ((!Key.isDown(Key.LEFT)) && (!Key.isDown(Key.RIGHT))) {
notStanding = true;
this.gotoAndStop(1);
} else {
notStanding = false;
}
if (Key.isDown(Key.SPACE) && fall == false && jump == undefined) {
this.gotoAndStop(4);
fall = true;
jump = jumpheight;
}
if (jump != undefined) {
if (jump>maxfall) {
jump--;
}
_y -= jump;
}
}
Problem #2: For some reason he can't jump. It's worked in the past but it just doesn't work now.