Unfortunately flash doesn't have an easy replace function.
In this case the easiest way may be to use a temporary array.
Assuming the filename is in a variable named filename you can do it like thisThe first line splits the string in an array using \ as a delimiter.Code:tmpArray = filename.split(String.fromCharCode(0x5c)); tmpArray[0] = 'http://www.domain.de'; filename = tmpArray.join(String.fromCharCode(0x2f));
The second line replaces the first item c: with your domain.
The third line combines it to a string again but this time with / as a delimiter.
If you don't want the domain name in it you can use
tmpArray.shift();
as the second line to remove the first array item.




Reply With Quote