You want some kind of Factory design pattern, to pick the appropriate class based on an input string. A nice application of that is Registry, where applicable classes "register" themselves with a singleton Registry class as being appropriate for a certain input string; the factory itself then just becomes a lookup from string to registered class. Some fallback needs to be present when no class has registered for the input string that's being requested: either that's an exception, or there's a "default" implementation that gets used when no more specific one applies -- the latter's a nice fail-soft option, but not always applicable.
An inevitable issue with Registry is, how to locate all classes of interest and make sure they register themselves (that's particularly of interesting for Plugin classes); the best solutions to this are rather dependent on the specific language at hand and unfortunately I'm not sure what AS3 delivers in this regard (or if you're at all interested in such dynamic expandability).
Another interesting issue with Registry is "conflicts" -- what happens if more than one applicable class claims to be the right one for a certain input string. "Last to claim wins" is simplest, but often too-simple; you may have each class register for multiple input strings with a certain "precedence" or "priority", or else (not really interesting on systems that aren't distributed, but crucial for distributed systems...) "load balance" among all applicable "servers" (round-robin or in more sophisticated ways).
You'll note that these solutions resemble your second one more than your first one, but the key difference is that instead of a brittle, rigid hard-coded switch (an OOP bete noire;-) they rely on flexible mappings from string to class (or class-constructing method, delegate, &c, depending on details of implementation language -- e.g. in Java you might have a StrategyConstructing interface, each strategy class would then register its own auxiliary class implementing that strategy when it signs up to the Registry).