PDA

View Full Version : Object detection at a certian point?


m33gzz
11-27-2009, 09:33 PM
I need to know how to have an object be reconized when it passes over a point on my stage. Then once that has happened an event happens such as a new screen appares.
anyone know how to do this?

krayzeebean
11-27-2009, 09:55 PM
You can use an enter frame listener with object.hitTestPoint(point.x point.y). When it returns true, show your new screen.

m33gzz
11-27-2009, 10:42 PM
You can use an enter frame listener with object.hitTestPoint(point.x point.y). When it returns true, show your new screen.

I'm not quite sure is would work with what I am doing
I am making horse race across a race track and when they cross the finish line it need to automaticlly show the winning screen ive made.

krayzeebean
11-27-2009, 10:46 PM
Then use hitTestObject instead.