You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!

Author Search Results: 'Ventranon'

We found 1 match.


<< < > >>

Viewing 1-1 of 1 match.

1.

Expressionless

Topic: hitTest problems

Posted: 12/30/08 03:42 PM

Forum: Flash

can any-one help me with hitTest?

Here's the codeof the box:

onClipEvent(enterFrame=function() {
if (this.hitTest(_root.ball)) { //object ball is a round shape as you expected (=
this.nextFrame(); //the box is usually green, when it hits the ball it goes to the next frame where its red.
} else {
this.prevFrame(); //the box turns red again if it doen't hit the ball
}
if (...
...}; //just movement with the arrow key's. No problems with that.
}

The code works fine but i'm not satisfied.
If the box hits the "blue square around the object if you select it in flash", it already turns green.
So it looks like the box turns too early green.

How do i get the excact hittesting?


All times are Eastern Standard Time (GMT -5) | Current Time: 08:35 PM

<< < > >>

Viewing 1-1 of 1 match.