Tile Puzzle Game

Can someone help me on the last part of this game i’m trying to make, you’ve all seem em, the tile games with one tile missing and when clicking a tile it slides into the empty stop.

I’ve got most of this working, code needs optimizing a bit i know but i’m stuck on the conditional part that will stop a tile moving unless it’s either one above, below to the left or to the right.

fla attached if someone can take a look i’d really appreciate it.!

you’ll need TweenLite for the actual movement i’ve not included this in the zip