the non-elegant way:
trace( "C:\Documents and
Settings\never\return".split("\D").join("\\D").split("\r").join("\\r").split("\n").join("\\n")
);
eh...
of course you'd really have to include all the possible escape chars
to deal with this correctly - and of course then you'd have to
consider the time to split/join all the chars...
g.
On 11/16/05, eric dolecki <[EMAIL PROTECTED]> wrote:
> I am being given local file paths to things, however the backslashes are
> screwing things up.
>
> trace( "C:\Documents and Settings" )
>
> You see the \ is eating the D - \D is a backspace? Its performing string
> modification. The problem compounds if there is a \r or \n in the filepath
> as well.
>
> Is the only solution here to have the string passed outside of flash the
> result of a search/replace ( "\" --> "/" ) ? I think I can get the developer
> to do this, but wondered if anyone else had run into this situation, and
> what you did to get around it.
>
> edolecki
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders