1 Reply Latest reply on May 10, 2006 12:17 PM by TimSymons

    getting top folder path

      Hey, I need some help. I'm trying to get the path to the top level folder from _root._url eg.( C:/Documents/flashFile/flashFiles.swf )
      Basically what I'm trying to pull from this string is ( C:/Documents/flashFile/). In Director I would use itemDelimiter to pull out the last item in the string, but have no idea how to accomplish this using flash. Any help would be appreciated.

        • 1. Re: getting top folder path
          TimSymons Level 1
          You can use the split() method for Strings. It is similar to the itemDelimiter used in Director.

          var myPath:String = _root._url;
          var tempArr:Array = new Array();
          tempArr = myPath.split("myfile.swf"); // use whatever you would like as the delimiter.
          myPath = tempArr[0];