         {
             if (rootURL)
             {
-                var lastIndex:int = Math.max(rootURL.lastIndexOf("\\"), rootURL.lastIndexOf("/"));
-                if (lastIndex <= 8)
-                {
-                    rootURL += "/";
-                    lastIndex = rootURL.length - 1;  // adding one later
-                }
-
                 // If the url starts from the current directory, then just skip
                 // over the "./".
                 // If the url start from the parent directory, the we need to
                 // modify the rootURL.
+                var lastIndex:int = Math.max(rootURL.lastIndexOf("\\"), rootURL.lastIndexOf("/"));
                 if (url.indexOf("./") == 0)
                 {
                     url = url.substring(2);

     *  relative to a root URL.
     * 
     *  @param rootURL An url that will form the root of the absolute url.
     *  This is typically the url of the application loading the url.
     * 
     *  @param url The url of the resource to load (may be relative).
     * 
     *  @return If <code>url</code> is already an absolute URL, then it is 
     *  returned as is. If <code>url</code> is relative, then an absolute URL is
     *  returned where <code>url</code> is relative to <code>rootURL</code>.  
     */ 
    public static function createAbsoluteURL(rootURL:String, url:String):String
    {

                    while (url.indexOf("../") == 0)
                    {
                        url = url.substring(3);
                        lastIndex = Math.max(rootURL.lastIndexOf("\\", lastIndex - 1), 
                                                       rootURL.lastIndexOf("/", lastIndex - 1));
                    }
                }
                                            
