1  /**
     2   * com.sekati.log.ConsoleDocument
     3   * @version 1.0.7
     4   * @author jason m horwitz | sekati.com
     5   * Copyright (C) 2007  jason m horwitz, Sekat LLC. All Rights Reserved.
     6   * Released under the MIT License: http://www.opensource.org/licenses/mit-license.php
     7   */
     8  
     9  import com.sekati.display.BaseClip;
    10  import com.sekati.log.Console;
    11  
    12  /**
    13   * ConsoleDocument controller simulates an AS3 DocumentClass
    14   * {@code Usage on first _root frame:
    15   * ConsoleDocument.main(this);
    16   * }
    17   */
    18  class com.sekati.log.ConsoleDocument extends BaseClip {
    19  
    20  	/**
    21  	 * Constructor
    22  	 */
    23  	private function ConsoleDocument() {
    24  		super( );
    25  		init( );
    26  	}
    27  
    28  	/**
    29  	 * Link the ConsoleDocument class to the _root timeline via constructor simulating an AS3 document class.
    30  	 * @param target (MovieClip)
    31  	 * @return Void
    32  	 */
    33  	public static function main(target:MovieClip):Void {
    34  		target.__proto__ = ConsoleDocument.prototype;
    35  		Function( ConsoleDocument ).apply( target, null );
    36  	}
    37  
    38  	/**
    39  	 * General movie setup and class compositions.
    40  	 * @return Void
    41  	 */
    42  	private function init():Void {
    43  		setMovieProps( );
    44  		buildCompositions( );
    45  	}
    46  
    47  	/**
    48  	 * general movie setup
    49  	 * @return Void
    50  	 */
    51  	private function setMovieProps():Void {
    52  		System.security.allowInsecureDomain( "*" );
    53  		System.security.allowDomain( "*" );
    54  		fscommand( "swLiveConnect", "true" );
    55  		fscommand( "allowscale", "false" );
    56  		fscommand( "showmenu", "false" );
    57  		fscommand( "fullscreen", "false" );
    58  		Stage.align = "TL";
    59  		Stage.scaleMode = "noScale";
    60  		_quality = "LOW";
    61  		_focusrect = false;
    62  	}
    63  
    64  	/**
    65  	 * centralize class compositions for core functionalities (Stage, ContextMenu, misc Managers)
    66  	 * @return Void
    67  	 */
    68  	private function buildCompositions():Void {
    69  		Console.getInstance( );
    70  	}
    71  }