# Tile based Boundary problem. (AS2)

**URL:** <https://forum.kirupa.com/t/tile-based-boundary-problem-as2/295308>\
**Category:** programming\
**Created:** [August 27, 2009, 10:56pm UTC](https://forum.kirupa.com/t/tile-based-boundary-problem-as2/295308 "2009-08-27T22:56:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olaf\_Forkbeard](https://avatars.discourse-cdn.com/v4/letter/o/c89c15/32.png) [@Olaf\_Forkbeard](https://forum.kirupa.com/u/Olaf_Forkbeard)\
**Post date:** [August 27, 2009, 10:56pm UTC](https://forum.kirupa.com/t/tile-based-boundary-problem-as2/295308/1 "2009-08-27T22:56:42Z")

</div>

Hello community.

I have this wierd problem with flash that I can’t understand. I am in the middle of making a tile based engine, and I have decided to do boundaries by hit testing a MC in the tile in question. Well if you will donwload my file and take a look…

[http://www.uploads.sc/download.php?file=b8bb98f8832eb9be7ff240e976b7165f](http://www.uploads.sc/download.php?file=b8bb98f8832eb9be7ff240e976b7165f)

You will find that in line 34 it states thus:

if (!gameMC.tiles.tile\_3\_4.hitTest(gameMC.you.\_x+newx, gameMC.you.\_y+newy, true)) {  
gameMC.you.\_x += newx;  
gameMC.you.\_y += newy;  
}

And that is great and all seeing how tile\_3\_4 is the grayed out block if you test the program. But when I walk over to tile\_3\_4 it does not stop me while on the other hand tile\_0\_0 (top left) does the appropriate behavior that 3\_4 if supposed to do. Please someone help me figure this out.

-Olaf

PS, I don’t know how long it will be till I get back to this but under 24 hours.
