This content has been marked as final. Show 7 replies
_root._url is going to return the path to your swf. is that the string you expected to start using to obtain the correct varpath value?
if so, what's _root._url and what string methods are you using?
_root._url is the path that i obtain for the correct varpath value which is /flashcontent/ and I've established this by tracing varpath.
My String methods that i use first is turning _root._url into a string...
var theString:String =_root._url;
...then after that I use substring, split to gather the correct portion i need.
I've even converted the string into an Array then got the correct portion I needed and then converted that back to a string with no success. This is where I'm at now!
again, what string methods are you using?
you must be using some string methods to extract the folder name string that contains your swf so you can use that in varpath. for example, i would use:
Thanks kglad I got a clue from your example where I was going wrong. I wasn't using unescape and my path had backslashes which caused a problem too. What I used in the end was this...
var mypath:String = unescape(this._url);
var my_array:Array = mypath.split("\\");
...this is working!!!