[Extendflash] path to folder containing FLA

Barbara Snyder brsnyder at macromedia.com
Wed Nov 30 12:31:28 PST 2005


On Windows, I had to change the line as follows:

	var path = docPath.substr(0,docPath.lastIndexOf('\\')); 

But it did work.

	C:\Documents and Settings\Barbara Business\My Documents\test.fla

became

	C:\Documents and Settings\Barbara Business\My Documents



This command (from another email) also worked 

	document.path.substr (0, document.path.indexOf(document.name));

and returned

	C:\Documents and Settings\Barbara Business\My Documents\
 

-- Barbara

-----Original Message-----
From: extendflash-bounces at flashguru.co.uk
[mailto:extendflash-bounces at flashguru.co.uk] On Behalf Of Derek Vadneau
Sent: Thursday, November 24, 2005 7:58 AM
To: Extendflash at flashguru.co.uk
Subject: Re: [Extendflash] path to folder containing FLA

I haven't tried this for JSFL but it should work:

var path = docPath.substr(0,docPath.lastIndexOf('/'));

This will return the path without an ending /.


Derek Vadneau

----- Original Message -----
From: "Ingo Weiss" <ingo01 at ingoweiss.com>
To: <extendflash at flashguru.co.uk>
Sent: Thursday, November 24, 2005 10:29 AM
Subject: [Extendflash] path to folder containing FLA


Hi all,

after an unsuccessful struggle with regular expressions, I am turning to
the list for help with retrieving the path to the folder that contains
the FLA file of the current document. Basicalliy document.path minus
/document.name.

Thanks for any help!
Ingo



More information about the Extendflash mailing list