FDT Pixlib template Main

Tags : , ,

a basic Main class template

<?xml version="1.0" encoding="UTF-8"?><templates><template autoinsert="true" context="com.pf.fdt.ui.editor.template.actionscript" deleted="false" description="Creates an MTASC public static main function" enabled="true" id="com.pf.fdt.ui.editor.template.smain" name="main">import com.bourre.core.HashCodeFactory;
import com.bourre.log.Logger;
import com.bourre.log.LogLevel;
import com.bourre.log.PixlibStringifier;
import com.bourre.utils.LuminicTracer;
import com.bourre.utils.SosTracer;
	
class ${enclosing_package_and_type} 
{
	private function ${enclosing_type}( mc:MovieClip )
	{
		Logger.LOG( toString() + " launched.", LogLevel.INFO );
		${cursor}
	}
	
	public static function main( mc:MovieClip ) : Void 
	{
		Stage.align = "TL";
		Stage.scaleMode = "noScale";
		mc._focusRect = false;
	
		Logger.getInstance().addLogListener( LuminicTracer.getInstance() );
		Logger.getInstance().addLogListener( SosTracer.getInstance() );
		var o:${enclosing_type} = new ${enclosing_type}( mc );
	}
	
	/**
 	* Returns the string representation of this instance.
 	* @return the string representation of this instance
 	*/
	public function toString() : String 
	{
		return PixlibStringifier.stringify( this );
	}
}</template></templates>