/*---------------- 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 * ------------------------------------------------------------------------*/ class nl.idgis.giclient.util.URLTools { static function getGIClientPath():String { var giClientURL:String = _root._url; var giClientPath:String = null; if (giClientURL.indexOf("\\") > -1) { giClientPath = giClientURL.substring(0, giClientURL.lastIndexOf("\\")); // Overcomes the bug in MSIE that backslashes are used for urls to the file system. } else { giClientPath = giClientURL.substring(0, giClientURL.lastIndexOf("/")); } return giClientPath; } static function loadMovie(target:MovieClip, url:String, name:String, depth:Number, initObject:Object) { if (url.indexOf("lib://") == 0) { target.attachMovie(url.substr(6), name, depth, initObject); } else { target.createEmptyMovieClip(name, depth); target[name].loadMovie(url); } } }