Guys im stuck in thought (Boundaries)...Help

Okay take example…

i got a tile…
I wanna be able to walk only up and down in that tile…
but when i get to a new tile
i wanna be able to walk up , down , and right…

I have tried using boundaries, and hittestobjects… but
as soon as player touches that tile… and is touching the other… it stops…

sooo im trying to find the best solution for path walking…

so say i draw a line ---------------- <-- thats all you would walk…on that line
Now if that line had ------±----- a four way … i want to be able to go up down left or right.

What you guys think?