private function getLvlClass( lvl:String ):Class{ switch( lvl ){ case "1": return Level1; case "2": return Level2; ... } return null; }