Skip to main content
Known Participant
November 17, 2010
Answered

quotes, blackslashes and escaping

  • November 17, 2010
  • 1 reply
  • 683 views

hello all,

This is probably a simple solution, so forgive me.  What I want to load some xml info into flash. I have a variable that holds a path to the xml document.

private var _xmlPath:String = "assets\xmlfiles\";

but it seems when I place the last backslash after xmlfiles Flash builder is telling me  I have no closing quotes. I assume this is do to the fact that I am probably escaping my quotes with the last backslash. 

How would I get the string "assets\xmlfiles\" into a variable without escaping the last quote?

Thanks a bunch.

This topic has been closed for replies.
Correct answer kglad

really, I did not know that, I will give that a try and play around.

thanks,


you're welcome.

1 reply

kglad
Community Expert
Community Expert
November 17, 2010

use a forward slash for a file path.

5SystemsAuthor
Known Participant
November 17, 2010

I don't think / will work as I am on a windows machine so I figured i would  tried \\ , and it seemed to work

private var _xmlPath:String = "assets\\xmlfiles\\";

I got the folllowing to trace out. assets\xmlfiles\Main_boards.xml, so I think all is good.

Thanks.

kglad

kglad
Community Expert
Community Expert
November 17, 2010

you're welcome.  (but forward slash works on windows.)