Lui
06-13-2005, 04:06 AM
OK this gravity problem is annoying me,
see I've checked kirupa and all the other flash site but there wasnt a code that fitted the current code im using to move the ball
ok here's my code
onClipEvent(load){
speed=6
}
onClipEvent(enterFrame){
if(Key.isDown(Key.UP)){
_y -= speed
}
if(Key.isDown(Key.RIGHT)){
_x += speed
}
if(Key.isDown(Key.LEFT)){
_x -= speed
}
if(Key.isDown(Key.DOWN)){
_y += speed
}
if(hitTest(_root.wall)){
_y -= 0//right
_y += 6//left
}
}
I've added all the gravity codes to the parts where it was supposed to be placed in, but it breaks up and it doesnt work
can some one please add a gravity code in the code im using?
see I've checked kirupa and all the other flash site but there wasnt a code that fitted the current code im using to move the ball
ok here's my code
onClipEvent(load){
speed=6
}
onClipEvent(enterFrame){
if(Key.isDown(Key.UP)){
_y -= speed
}
if(Key.isDown(Key.RIGHT)){
_x += speed
}
if(Key.isDown(Key.LEFT)){
_x -= speed
}
if(Key.isDown(Key.DOWN)){
_y += speed
}
if(hitTest(_root.wall)){
_y -= 0//right
_y += 6//left
}
}
I've added all the gravity codes to the parts where it was supposed to be placed in, but it breaks up and it doesnt work
can some one please add a gravity code in the code im using?