PDA

View Full Version : hitTesting problems



habes
January 9th, 2006, 06:52 PM
I'm sorry if this has been posted before... I couldnt find anything that would help me though.
I'm working on a RPG that uses tiles, to a point. There isn't any arrays as I couldnt get them to work on my computer (it isnt my coding or anything, just my computer wont display the tiles when using arrays).

I have been working on coding a hitTest for my walls but can't seem to get it to work. I dont really understand the getBounds, but open to learning. I dont need a wall around the border of each scene. The bottom grass layer does not need coding, just the overlay "map."
Any suggestions on how to create my code would be great!

Ill post the fla. so you can see what Im talking about. Im using flash MX.
Please note I removed earlier coding attemps

nathan99
January 9th, 2006, 09:42 PM
i put my excellent designing abilities to work and created a masterpice to show the points of getBounds


EDIT::Just saw your using MX,
_y becomes this._y,
and _x, turns into this._x
getBounds, this.getBounds

habes
January 9th, 2006, 10:14 PM
that explains alot! thanks!

nathan99
January 9th, 2006, 10:20 PM
np;)