Pedal-kid
07-03-2008, 10:03 PM
I need help!! I am making a stickman game, and I got trouble with the hittest allready.. When the stickman hits the ground, flash is supposed to gotoAndStop frame 3 inside the Stickman MC.. But I when flash has played the "clip" inside frame 3 in the Stickman MC, I wont flash to go to another frame frame, and stop repeating the clip inside frame 3 in Stickman MC
plz download and help me
here is the download link:)
http://www.zshare.net/download/146491303ee1db5a/
And if you need the actionscript code;Here it is:
onEnterFrame=function() {
gravity=9;
dude._y+=gravity;
xspeed=4;
if (dude.hitTest(ground)) {
gravity=false;
if (gravity==false) {
dude.gotoAndStop(4);
dude._y=ground._y-17;
if (Key.isDown(Key.LEFT)) {
dude._x-=xspeed;
dude.gotoAndStop(3);}
if (Key.isDown(Key.RIGHT)) {
dude._x+=xspeed;
dude.gotoAndStop(2);
}
}
}
}
plz download and help me
here is the download link:)
http://www.zshare.net/download/146491303ee1db5a/
And if you need the actionscript code;Here it is:
onEnterFrame=function() {
gravity=9;
dude._y+=gravity;
xspeed=4;
if (dude.hitTest(ground)) {
gravity=false;
if (gravity==false) {
dude.gotoAndStop(4);
dude._y=ground._y-17;
if (Key.isDown(Key.LEFT)) {
dude._x-=xspeed;
dude.gotoAndStop(3);}
if (Key.isDown(Key.RIGHT)) {
dude._x+=xspeed;
dude.gotoAndStop(2);
}
}
}
}