1  
     8   
     9  import com.sekati.core.CoreObject;
    10  import com.sekati.core.FWDepth;
    11  import com.sekati.display.BaseClip;
    12  import com.sekati.draw.Rectangle;
    13  import com.sekati.geom.Point;
    14  import com.sekati.utils.ClassUtils;
    15  
    16  
    23  class com.sekati.ui.ScreenProtector extends CoreObject {
    24  
    25  	private var _cover:MovieClip;
    26  	private var _isLocked:Boolean;
    27  
    28  	
    31  	public function ScreenProtector() {
    32  		super( );
    33  		_cover = ClassUtils.createEmptyMovieClip( com.sekati.display.BaseClip, _root, "__ScreenProtector__", {_x:0, _y:0, _alpha:0, _depth:FWDepth.ScreenProtector} );
    34  		Rectangle.draw( _cover, new Point( 0, 0 ), new Point( Stage.width, Stage.height ), 0xFF00FF, 0 );
    35  		_cover.onPress = new Function( );
    36  		_cover.useHandCursor = false;
    37  		_isLocked = true;
    38  	}
    39  
    40  	
    44  	public function update():Void {
    45  		_cover.swapDepths( _level0 );
    46  	}
    47  
    48  	
    52  	public function get enabled():Boolean {
    53  		return _isLocked;	
    54  	}
    55  
    56  	
    60  	public function set enabled(b:Boolean):Void {
    61  		_isLocked = b;
    62  		if (b) {
    63  			update( );	
    64  		}
    65  	}
    66  
    67  		
    71  	public function destroy():Void {
    72  		_cover.destroy( );
    73  		super.destroy( );
    74  	}
    75  }