- Code: Select All Code
onClipEvent(enterFrame) {
if(_root.movement or _root.movementright) {
if(Key.isDown(Key.RIGHT)) {
_x += _root.movespeed;
right = true;
gotoAndStop(2);
} else if(right)
gotoAndStop(1);
}
if (_root.movement or _root.movementleft) {
if(Key.isDown(Key.LEFT)) {
_x -= _root.movespeed;
right = false;
gotoAndStop(4);
} else if(!right)
gotoAndStop(3);
}
if (_root.movement or _root.movementleft) {
if(Key.isDown(Key.SPACE)) {
_x -= _root.movespeed;
right = false;
gotoAndStop(6);
} else if(!right)
gotoAndStop(5);
}
}
I have little programming experience and have never worked with actionscript before, but I assummed that the gotoAndStop(6); and gotoAndStop(5); would access the two frames I added to krystals animation slots. But for some reason instead when you press space she just glides backwards. Anyways thanks for the help and here is the crappy little scene I've built, not much but I tried to make it windy . My idea is to create a minigame where crystal has to jump over stuff that the wind is blowing towards her.