Flash actionscript 3.0: A Star path finding Algorthim in Actionscript3.0

A Star path finding Algorthim in Actionscript3.0

Posted by Sankar.G | Posted in | Posted on 12:14 PM

A star is a Computer Algorithm that is widley used in path finding
the process of plotting an eficiently traversable path between
points called nodes A* is a very general and flexible graph traversal algorithm noted for its performance and accuracy.
As such,it is the most widely used graph traversal algorithm
A* is uses best-first search and finds the least-cost path from
a given initial node to one goal node

we are going to use this A* in our actionscript3.0
1) Click ok the grid you will place a green box
2) second click you place a Blue Box in the Grid
3) And After the Third Click you will place a black
boxes in the Grid ....

First Green box is the Orgin and second Blue box is the
desitination and black boxes are the Hurdles....
after place this press spacebar in the keyboard ....

Orgin Box will move to the desination box in the correct Path...

Below Link is used to get the a star path finding algorithm in AS3.0


Comments (6)

Thank you very much indeed! =*^_^*=
I'm working on project that involves only 4 way character movement(each character has only 4 visual sides, not 8), so i'd modified both your tutorial and search engine(one check box added and one argument to search method).
Update your post please =*^_^*=

Have added walls support =*^_^*=(engine+interface).
Unfortunately current version does not support two walls in one cell, will add it later.

Added support for two walls in one cell. Stable version(tested).
Enjoy =*^_^*=


Have you tried changing the grid size ? It's not working, if you change it.

If you make a large map (change numRows and numCols to 100 each) and surround the target with walls, the flash file freezes.

Thank you very much for this algorithm, it saved me a lot of time. I used it on a floor map ( 1600x900 ) and I did some small adjustments to the performance dividing everything by 10 so it will run much faster. It's precise and I only defined the right path, not the "walls" in order to be easier to reach the room you want.

Again, thank you very much for this, really appreciated !!! :)