Be a Supporter!

Argh, this is giving me a headache.

  • 319 Views
  • 0 Replies
New Topic Respond to this Topic
uyersuyer
uyersuyer
  • Member since: May. 15, 2002
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Argh, this is giving me a headache. 2006-11-04 22:52:58 Reply

[quote]
if(Key.isDown (Key.SHIFT)) {
if(jump){
if(!_currentframe==11){
gotoAndStop(11);}}[/quote]

That's supposed to make it so that whenever you press shift while jumping, it makes you go to frame 11 of the movie clip, but it doesn't work. I have no idea why.

[quote]
onClipEvent (load) {
jump = false;
scream = false;
s = 6;
this.gotoAndStop(1);
b = this.getBounds(this);
_root.timerID = setInterval(_root.goTime, 10);
function move(x, y) {
h = false;
if (!_root.map.hitTest(_x+x+b.xmin, _y+y+b.ymin, true)) {
if (!_root.map.hitTest(_x+x+b.xmax, _y+y+b.ymin, true)) {
if (!_root.map.hitTest(_x+x+b.xmin, _y+y+b.ymax, true)) {
if (!_root.map.hitTest(_x+x+b.xmax, _y+y+b.ymax, true)) {
_root.map._x -= x;
_root.map._y -= y;
h = true;
}
}
}
}
return h;
}
}
onClipEvent (enterFrame) {
falling = move(0, s);
if (Key.isDown(Key.SPACE) && !falling && !jump) {
jump = true;
vel = -10;
_root.jumpSound.gotoAndPlay(2);
}
if (Key.isDown(Key.LEFT)) {
_xscale = -100;
move(-s, 0);
this.play();
_root.moveSound.gotoAndPlay(2);

}
if (Key.isDown(Key.RIGHT)) {
_xscale = 100;
move(s, 0);
this.play();
_root.moveSound.gotoAndPlay(2);

}
if(Key.isDown (Key.SHIFT)) {
if(jump){
if(!_currentframe==11){
gotoAndStop(11);}}

}
if (jump) {
if (vel<=10) {
h = move(0, vel-s);
if (h == false && vel<0) {
vel *= -1;
}
vel++;
} else {
jump = false;
}
}
if (_root.map._y<-850) {
_root.map._x = 0;
_root.map._y = 0;
scream = false;
}
if (falling) {
gotoAndStop("jump");
} else {
if (_currentframe == 5) {
gotoAndStop(1);
}
}
}
onClipEvent (keyUp) {
this.gotoAndStop(1);
}[/quote]

That's the full code.

Any suggestions?


"Whoever said 'winners never quit' obviously never considered addicts." - Hoeloe

BBS Signature