The source files
Friday, April 14th, 2006Hey,
I promised in one of my posts that I would be posting the source files… So here they are!
Hey,
I promised in one of my posts that I would be posting the source files… So here they are!
Hi,
Introduction
I’m not going to be explaining the entire concept behind a BinaryHeap since that would take way to long and my explanation would probably suck. A very good explanation of a BinaryHeap can be found here.
If you clicked on that link, you might have noticed that the Title is about Binary Heaps in A*. As you might have guessed, I use a Binary Heap in my A*. (That’s also one of the things that makes it so fast).
Ofcourse, there are some other really good Flash-Astar-implementation out there. I’ve heard from a lot of people that Zeh’s implementation is about the fastest implementation on the Internet. Logically, I put the two up for a little speed test…
Now that you have the component installed, it’s time to put it to use…
A good friend asked me how he could dispatch his own events. This is done by the EventDispatcher class, but after some searching, I couldn’t find a good explenation. That’s why I made this little example to show him how to use it.
I might as well show it with everyone else :). The .fla and .as files are commented with some explanation.
Download it here: EventDispatcher example