//private var _heuristic: Function = manhattan;
//private var _heuristic: Function = euclidian;
private var _heuristic: Function = diagonal;
these are cost functions! each uses a different method, for example one uses,
if its left or right or top or bottom cell, it will cost 1 and if its topLeft, topRight, bottomLeft, bottomRight Cells it will cost 1.5 point, and it will uses these point to find the nearest path!
there is also custom costing as well ! why ? , for example every where is ground and some parts are water cells, you can say ground cells worth 1 point and water cells worth 3 point, meaning if you pass 3 ground cells it equals passing one water cell, and all these also will be considered in your nearest path Algorithm ,
and using it, you can easily make a game with different fields and paths
there is also
if (test == node || !test.walkable || !_grid.getNode(node.x, test.y).walkable || !_grid.getNode(test.x, node.y).walkable) continue;
this part which has walkable variable for each node, hopefullyif its true, the node can be used as a path! and if its false that node IS NOT WALKABLE this way you can even build walls and impossible to walk objects in some cells
hopefully what i said helps you.
Good luck.