var instance:Sprite;
if ( ApplicationDomain.currentDomain.hasDefinition("MyClassName") )
{
var MyClass:Class = getDefinitionByName( "MyClassName" ) as Class;
instance = new MyClass( params ) as Sprite;
}else {
instance = new Sprite( params );
}