cuba
05-04-2002, 11:40 AM
hi everybody
i got a problem in a game. my movie has the following dimensions:
550x400 px. i got a flying object (ship) in the movie. it shouldn't be possible to fly out of the stage. i created 4 clips around the stage and attatched the following script: this is for the left border:
onClipEvent (enterFrame) {
if (this.hitTest(_root.ship)) {
_root.ship._x = _root.ship._x+12;
}
}
it works like this, but not propperly !!! the "ship" gets "nervous" and it's quite difficult to get it out of the "hitTest"
is there another way to stop my object on every side of my movie ???
i hope you'll understand what i mean...
thanks in advance for you help!!!:-)
i got a problem in a game. my movie has the following dimensions:
550x400 px. i got a flying object (ship) in the movie. it shouldn't be possible to fly out of the stage. i created 4 clips around the stage and attatched the following script: this is for the left border:
onClipEvent (enterFrame) {
if (this.hitTest(_root.ship)) {
_root.ship._x = _root.ship._x+12;
}
}
it works like this, but not propperly !!! the "ship" gets "nervous" and it's quite difficult to get it out of the "hitTest"
is there another way to stop my object on every side of my movie ???
i hope you'll understand what i mean...
thanks in advance for you help!!!:-)