-
[RESOLVED] finding a relative path
Hello,
I need to find a way to find the "relative path" of my .swf from within itself via AS3. How do I find it's own 'relative path'?
Thanks!
-Jake
-
You can use the url property of the loaderInfo associated with the swf.
-
Thanks, that led me in the right direction... but I am still stumped
Now what I need to do is to get the relative path of the FOLDER the swf is located in. How would this be accomplished?
Thanks again!
-Jake
-
I think you mean 'absolute' rather than relative. The relative path of the swf is ".", and the relative path of the directory the swf is in is "..".
But to get the absolute path of the folder the swf is in, use the url from the loaderInfo and use substring to remove the bit after the last "/". lastIndexOf can find that position.
-
Thanks!! that is exactly what I needed!
-Jake
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|