/*---------------- FILE HEADER --------------------------------------- This file is part of Geoide. Copyright (C) 2005-2006 by: IDgis B.V. http://www.idgis.nl This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: Herman Assink IDgis bv P.O. Box 15 7450 AA Holten The Netherlands E-Mail: herman.assink@idgis.nl * @version 1.4.0 * @author IDgis team * ------------------------------------------------------------------------*/ import nl.idgis.giclient.config.Colors; import nl.idgis.giclient.Ruler; import nl.idgis.giclient.util.Strings; class nl.idgis.giclient.framework.MainFrame extends MovieClip { private var horiMargin:Number = 8; private var vertiMargin:Number = 40 - 8; private var thickness:Number = 8; private var ruler:Ruler = null; //set by initobject private var bovenRand:MovieClip = null; private var onderRand:MovieClip = null; private var linkerRand:MovieClip = null; private var rechterRand:MovieClip = null; function onLoad():Void { useHandCursor = false; Stage.addListener(this); drawAll(); } function onResize():Void { drawAll(); } private function drawAll():Void { var stageWidth:Number = Stage.width; var stageHeight:Number = Stage.height; var colors:Array = null; var topLeftColor:Number = Colors.topLeftColor; var topRightColor:Number = Colors.topRightColor; var bottomLeftColor:Number = Colors.bottomLeftColor; var bottomRightColor:Number = Colors.bottomRightColor; var backGroundColor:Number = Colors.backGroundColor; clear(); //bovenrand if (bovenRand != null) bovenRand.removeMovieClip(); colors = [topLeftColor, topRightColor]; bovenRand = attachMovie("MapViewBorder", "NavN", 0, {_x: horiMargin, _y: 0, gism: ruler.getGIS(), tip: //"Naar boven", ( Strings.getFile("Geoide").getString("Up")), width: stageWidth - (2 * horiMargin), height: thickness, clrs: colors}); //onderrand if (onderRand != null) onderRand.removeMovieClip(); colors = [bottomLeftColor, bottomRightColor]; onderRand = attachMovie("MapViewBorder", "NavZ", 1, {_x: horiMargin, _y: stageHeight - thickness, gism: ruler.getGIS(), tip: // "Naar onderen", ( Strings.getFile("Geoide").getString("Down")), width: stageWidth - (2 * horiMargin), height: thickness, clrs: colors}); //linkerrand if (linkerRand != null) linkerRand.removeMovieClip(); colors = [topLeftColor, bottomLeftColor]; linkerRand = attachMovie("MapViewBorder", "NavW", 2, {_x: 0, _y: vertiMargin, gism: ruler.getGIS(), tip: //"Naar links", ( Strings.getFile("Geoide").getString("Left")), width: thickness, height: stageHeight - (2 * vertiMargin), clrs: colors}); //rechterrand if (rechterRand != null) rechterRand.removeMovieClip(); colors = [topRightColor, bottomRightColor]; rechterRand = attachMovie("MapViewBorder", "NavO", 3, {_x: stageWidth - thickness, _y: vertiMargin, gism: ruler.getGIS(), tip: //"Naar rechts", ( Strings.getFile("Geoide").getString("Right")), width: thickness, height: stageHeight - (2 * vertiMargin), clrs: colors}); //fill corners beginFill(backGroundColor, 100); moveTo(0, 0); lineTo(horiMargin, 0); lineTo(horiMargin, vertiMargin); lineTo(0, vertiMargin); endFill(); beginFill(backGroundColor, 100); moveTo(stageWidth, 0); lineTo(stageWidth - horiMargin, 0); lineTo(stageWidth - horiMargin, vertiMargin); lineTo(stageWidth, vertiMargin); endFill(); beginFill(backGroundColor, 100); moveTo(0, stageHeight - vertiMargin); lineTo(horiMargin, stageHeight - vertiMargin); lineTo(horiMargin, stageHeight); lineTo(0, stageHeight); endFill(); beginFill(backGroundColor, 100); moveTo(stageWidth - horiMargin, stageHeight - vertiMargin); lineTo(stageWidth, stageHeight - vertiMargin); lineTo(stageWidth, stageHeight); lineTo(stageWidth - horiMargin, stageHeight); endFill(); attachMovie("SchaduwHor", "horiShade", 4, {_x: thickness, _y: thickness, _width: stageWidth - (2 * thickness), _height: thickness / 2}); attachMovie("SchaduwVert", "vertiShade", 5, {_x: thickness, _y: thickness, _height: stageHeight - (2 * thickness), _width: thickness / 2}); } //"Roll" functions are for "onMouseMove" in the map viewer. //function onRollOver():Void {} //function onRollOut():Void {} }