Home / Components / Applications & Games / A Star Path Finder for Flex AS3 /

A Star Path Finder for Flex AS3

4 purchases

miniclip Applications & Games A Star Path Finder for Flex AS3 This is an A Star pathfinder class component optimized for AS3 and Flex. Is widely used in games to give artificial intelligence features in game sprites so they can be able to find the shortest path between two points in a maze-like search space. $49 http://www.flashcomponents.net/component/astar_path_finder_for_flex_as3.html http://www.flashcomponents.nethttp://u1.flashcomponents.net/components/small/1229_1.png

License:

By purchasing and downloading this license, you are entitled, as buyer, to use the product in ONE SINGLE NON-COMMERCIAL PROJECT ( website or other ... [+]

> View graphic table with full license features

$49.00

buy now

Package includes: Example Flex project + .swc component

Flash Version: Flex

Viewable with: Flash Player 9

Action Script: ActionScript 3.0

Product ID:F0801229

Author:

miniclip

miniclip avatar

 

Please install flash first.

A-Star path finding is widely used in games to give artificial intelligence features in game sprites so they can be able to find the shortest path between two points in a maze-like search space.

This is a non-visual .swc component that you can use in your Flex Projects. It is specially optimized to be very fast since this kind of algorithms need much processing power.

The example project contains a very simple example. The constructor needs a BitmapData structure where white (0xFFFFFFFF) is walkable and black (0xFF000000) is non-walkable.

Once you have created the path finder object you may call the FindPath(startX,startY,endX,endY) method. This takes 4 parameters. The first two are the X,Y values of the start point and the last two are the X,Y values of the end point. If the method returns an array of some length then it has found a path. Each element in the array is itself an array which contains the X and Y coordinates of each step in the path.

* To use the example, just click and drag in the white areas. The mouse-down marks the start position and the mouse-up marks the end position. The path finder will then find the shortest path from start to finish.

A-Star Path Finder Sample:
Just click and drag in the white area. A mouse-down marks the start position and a mouse up marks the end position. Then the path finder will find the shortest path and paint it red.

$49.00

buy now

License:

Personal License By purchasing and downloading this license, you are entitled, as buyer, to use the product in ONE SINGLE NON-COMMERCIAL PROJECT ( website or other multimedia project not generating income ), your personal work or work for a client. You may not redistribute / resell the functionality provided with the purchased product without the author's and / or FlashComponents.net written permission, but you may modify its content. In case you want to use the product for a commercial project then you will have to buy the 'Commercial License'.

Usage Terms: Personal Commercial Multiple
Use in ONE SINGLE NON-COMMERCIAL project
Unlimited use in the same project
Use in ONE SINGLE COMMERCIAL project
For your client's ONE SINGLE COMMERCIAL project
MULTIPLE COMMERCIAL projects
For your client's MULTIPLE COMMERCIAL projects

1 / 17

Featured components:

2 Scrollers XML Photo Gallery

Scroll photos gallery with picture and descript...[+]

More >>

Karthick 3D Image Carousel

An advanced 3D image carousel with plenty of op...[+]

More >>

XML Driven Gallery - Set Menu

XML Gallery Menu - set: vertical, horizontal, g...[+]

More >>

2 comments

Add comment

  • The component looks great but I have 2 questions!


    1.) Does it work with Flash?
    Just saying Flex, using Flex library so not working with Flash?


    2.) Is it possible to set the size of the line when calculate?
    If there is space between “boxes” and the line is thicker, does it notice that it has to “take another way”?



    #  /  PM  /  posted on Oct 19, 2009
  • 1) The component is in .swc format which can also be used in Flash. I am sorry but I do not use flash so I could not direct you on how to use it in Flash. A google search might help though.


    2) Actually the line and the area is a grid of 10 rows by 10 columns. Each dot on the line is a walkable grid tile from start to finish. So, the line is used only to depict how the algorithm works. This is actually a component without a visual appearance. It is a path finding algorithm which allows you to find a path on a grid of walkable and non walkable tiles.



    #  /  PM  /  posted on Oct 19, 2009
Please login to post comments.