August 11, 2008
Author's Response:
Hm yeah I think it would be possible to do this if you change the scripts a bit, for exemple, instead of writing that when the UP touch is down: circle jumps, write that when circle hit Y: circle jumps (if Y is an object that follow your cursor). Maybe it could be written that way (put that script on circle):
onClipEvent (load) {
fall = false;
_name = "circle";
jump = 0;
speed = 8;
jumpheight = 10;
maxfall = -54;
}
onClipEvent (enterFrame) {
xmin = getBounds(_root).xMin;
xmax = getBounds(_root).xMax;
ymin = getBounds(_root).yMin;
ymax = getBounds(_root).yMax;
if (this.hitTest(_root.y)) && fall == false && jump == undefined) {
fall = true;
jump = jumpheight;
}
if (jump<>undefined) {
if (jump>maxfall) {
jump--;
}
_y -= jump;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_x -= speed;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
}
}
Good luck with your game and thanks for the comment =)