/*----------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License.You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is Fever Framework code. The Initial Developer of the Original Code is Romain Ecarnot. Portions created by Initial Developer are Copyright (C) 2006 the Initial Developer. All Rights Reserved. Contributor(s): Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -----------------------------------------------------------------------------*/ import com.kairos.utils.Monitor; import fever.display.FeverStage; /** * Just small extension of core Kairos Monitor object. * *

Creates monitor target on a overlayed layer using Fever * engine and {@code #create()} method. * * @author Romain Ecarnot */ class fever.utils.FMonitor extends Monitor { //------------------------------------------------------------------------- // Public API //------------------------------------------------------------------------- /** * Creates a monitor on top of stage layer. */ public static function create( width : Number, height : Number ) : FMonitor { return new FMonitor( _createMCTarget(), width, height ); } /** * Constructor. * * @param target {@code MovieClip} target for the monitor. * @param width {@code Number} of pixel of the graph's width. * @param height {@code Number} of pixel of the graph's height. */ public function FMonitor( target : MovieClip, width : Number, height : Number ) { super( target, width, height ); } /** * */ public function setLocation( x : Number, y : Number ) : Void { __mcRoot._x = x; __mcRoot._y = y; } /** * */ public function setAlpha( alpha : Number ) : Void { __mcRoot._alpha = alpha; } //------------------------------------------------------------------------- // Private implementation //------------------------------------------------------------------------- /** * Creates monitor target on top of application layers. */ private static function _createMCTarget( ) : MovieClip { return FeverStage.getInstance().createOverlayTarget(); } }