[AS3] tile-based zombie game

hello all. i am a pseudo-intermediate flash and as user, and i’ve come across an issue. i know that logically there is a way to achieve what i want with code, but i’m not sure how to go about it.

i am focusing on a tile-based game in which enemies move randomly, as per the famed Tonypa tutorial: http://www.tonypa.pri.ee/tbw/tut09a.html (bottom screen)

i would like to combine this with an agro range, as per this tutorial: http://www.freeactionscript.com/category/game-examples/enemy-ai/page/2/ (top screen)

my logic is that the Tonypa tutorial would dictate the enemies movements, but the agro range will cause them to move toward the player. is this possible without pathing?

secondly, i am trying to adapt the Tonypa to AS3, and am having a rough time, especially understanding the “walkable” parts. i am pretty much using the same coding to work out the bugs, but with a stage of 800x600, with tiles of 25x25.

lastly, i would like to generate the array randomly (all except the wall parts). my theory is
that i can do it by generating a random number between, say, 0 and 4, and that can determine the tiles that will be loaded. each number will have a different function, such as wall, tree, spawn point for enemies, and spawn for survivors, which are picked up for points. enemies will continually spawn, survivors will not. is this feasible? am i thinking this through correctly?

in my head it all makes sense and should be possible, but i’m just not confident enough in my coding skills. i will most likely post later once i have some piece of working code. in the meantime, if anyone has any tips for using the Tonypa tutorial in AS3, that would be lovely.