Festança flash game

Flash game I did the development on 2010 for Editora Globo, using A* for path finding. That was one of my first contact with data structures for games. public class AStar public class AStar {    private var graph:Graph; private var g:Vector.<Number>; private var h:Vector.<Number>; private var f:Vector.<Number>; private var parent:Vector.<int>; private var open:Vector.<int>; private…

AS3 invoking class from linkage by string

Today I was programming a game and I run over a problem, I had to invoke a Class by its string name. It can easly be solved by using a switch like: var className:String = “ClassNameOnTheLibrary1”; var gamePhase:MovieClip; switch(className){ case “ClassNameOnTheLibrary1”: gamePhase = new Phase1(); break; case “ClassNameOnTheLibrary2”: gamePhase = new Phase2(); break; } Now…