Tactics rpg movement/battle

I’m trying to create a tactics rpg in flash. Something similar to Final Fantasy Tactics. I’m making the movement and battle controls and so far all I can seem to think of is selecting all active grid spots within a given range. It doesn’t do anything with pathing at all so even if grid spots are on the other side of a wall or something, it still makes them active. It also doesn’t really do much with elevation at all either. I’ve been working on it for a couple days and I just can’t seem to think of how to do what I need. If anybody has any suggestions, sample code, or links to tutorials or whatever on how to do this kind of stuff that would be appreciated. Also, I’ll attch the fla so you can look at what i’ve done so far.