Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-09-2004, 11:26 PM
Member
 
Join Date: Sep 2003
Posts: 95
Default Why is traversing UP the getAppDir path so complicated?

???

To add code to the getAppDir path is easy:

// find where the exe is being run
var path = getAppDir();
trace("path");

// add anything to the path
plusPath = path + ("WHATEVER");
trace("plusPath");



HOWEVER, to remove code from the path using getAppDir:

var path = getAppDir();
trace("path");

// remove something from the path
minusPath = path - ("WHATEVER");
trace("minusPath");

doesn't work!

You have to use path.replace....

Any reason for this?

G.
Reply With Quote
  #2 (permalink)  
Old 03-12-2004, 02:54 AM
Member
 
Join Date: Jun 2003
Posts: 39
Default Re:Why is traversing UP the getAppDir path so complicated?

Why not use folder.parentPath to traverse up the path ???
Reply With Quote
  #3 (permalink)  
Old 03-14-2004, 11:50 PM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:Why is traversing UP the getAppDir path so complicated?

while that would work it would still be just as complicated.... if not more so....

if I needed to traverse several directories up I'd have to stick that code in a loop, instead of using the .replace to just substitute the old path with the new one....
Reply With Quote
  #4 (permalink)  
Old 03-15-2004, 12:00 AM
Member
 
Join Date: Jun 2003
Posts: 39
Default Re:Why is traversing UP the getAppDir path so complicated?

That will only work if you know exactly what the path is. If someone moves your .exe you may have troubles.
Reply With Quote
  #5 (permalink)  
Old 03-15-2004, 03:42 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:Why is traversing UP the getAppDir path so complicated?

True.

But I'd have to edit my code regardless.... even if I did use folder.parentPath....
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:53 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.