Thanks
function replaceSpace(s:String):String{
return s.split(" ").join("%20");
}
Thanks
on (release) {
s = _root.address.text
function replaceSpace(s:String):String{
return s.split(" ").join("%20");
}
if ((_root.address.length>0) & (_root.city.length>0) & (_root.zip.length>0)) {
url =
"http://www.mapquest.com/directions/main.adp?go=1&do=nw&un=m&2tabval=address&cl=
EN&ct=NA&1tabval=address&1y=US&1a=" + s + "&1c=" + _root.city.text + "&1z=" +
_root.zip.text + "&2y=US" + "&2a=" + address_2 + "&2c=" + city_2 + "&2s=" +
state_2 + "&2z=" + zip_2 +
"&idx=0&id=410ed2bb-002ee-01b60-400c3301&aid=410ed2bb-002ef-01b60-400c3301";
getURL(url)
trace(url)
} else {
_root.error = "Error: Please fill out all text fields";
}
}
on (release) {
s = replaceSpace(_root.address.text);
// and the code below appears incorrect. should these be checking the text
properties?
if ((_root.address.length>0) & (_root.city.length>0) & (_root.zip.length>0)) {
url =
"http://www.mapquest.com/directions/main.adp?go=1&do=nw&un=m&2tabval=address&cl=
EN&ct=NA&1tabval=address&1y=US&1a=" + s + "&1c=" + _root.city.text + "&1z=" +
_root.zip.text + "&2y=US" + "&2a=" + address_2 + "&2c=" + city_2 + "&2s=" +
state_2 + "&2z=" + zip_2 +
"&idx=0&id=410ed2bb-002ee-01b60-400c3301&aid=410ed2bb-002ef-01b60-400c3301";
getURL(url)
trace(url)
} else {
_root.error = "Error: Please fill out all text fields";
}
}
// attached to a frame:
Hope this also helps others on the forum.
Thanks