I am trying to send a path string to a php file but it needs to be encoded before.. so anyhow? thanks.
The path in as3: "D:\Graphics\Digital\Marketing-02.jpg"
In php it comes without "\": "D:GraphicsDigitalMarketing-02.jpg"
receivepathstring = implode("\",explode("@",sendpathstring));
Thanks for your responding
Actually the proplem is in the string in actionscript, when I trace the string "D:\Graphics\Digital\Marketing-02.jpg" the output shows this resault: D:GraphicsDigitalMarketing-02.jpg
yes, replace the back slash (an as3 escape character) with something else as suggested. exactly how you do that (and where you do that) deepends on how/where the string is created.
The string created in the same actionscript file, the big problem is that I can't replace it because as3 escape the character in .split() command!
Then how to store a path?
how do you create the path?
var _path:String = "D:\Graphics\Digital\Marketing-02.jpg";
in as3 use:
var _path:String = "D:\\Graphics\\Digital\\Marketing-02.jpg";
and in php you may need to use:
$_php_path = implode("\\",explode("\",$as3_path));
Thanks kglad I've used str_replace() command in PHP it works for now but still looking for some decoder for all the string because I am facing another problem with "&" charactor in the file name! I think the only way is to make a function to replace all the marks..
It won't work this way "var _path:String = "D:\\Graphics\\Digital\\Marketing-02.jpg";"
The path string should be taken from a text field..
did you embed punctuation?
Yes I did but even in trace output it doesn't show the backslash.. I am storing the path in a string.
when testing if you type a\b in your input textfield (eg, tf) and then trace tf.text, what do you see?
keep tracing as you do other things that you're not explaining here until you pinpoint the problem. then explain.
I explained many times.. I have no text field, I only have a string and I want to store a path in this string:
var _path:String = ("D:\Graphics\Digital\Marketing.jpg");
trace(_path); // Output: D:GraphicsDigitalMarketing.jpg
You can try te code.
you said this in your june 13 message, "The path string should be taken from a text field.."