Return to Snippet

Revision: 16634
at August 10, 2009 16:28 by forchid


Initial Code
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 );
}

Initial URL

                                

Initial Description

                                

Initial Title
Check if Class Definiton exists

Initial Tags
class

Initial Language
ActionScript 3