This content has been marked as final. Show 10 replies
where are address and city and zip defined?
They would enter that into the three text fields above the button in the main movie. That code is attached to the button . . . this works like a mapquest . . . they enter their starting address and I have predefined the ending for them.
Do you think you can look at the FLA that I provided to maybe see what I mean?
Thank you for any help in advance!!!
first of all........I don't see a ";" at the end of most of those lines.
second, If this code claims to be AS2, why not define the variables outside of the button w/appropiate data types.
for security reasons, I won't/can't download your fla, so to better help ya, can you paste the trace error that flash outputs? you said it was a syntax error, so flash musted it got it.
**Error** Scene=Scene 1, layer=Mapquest, frame=1:Line 13: Syntax error.
url = " http://www.mapquest.com/directions/main.adp?go=1&do=nw&un=m&2tabval=address&cl=EN&ct=NA&1t abval=address&1y=US&1a=" add address.text add "&1c=" add city.text add "&1z=" add zip.text add "&2y=US" add "&2a=" add address_2 add "&2c=" add city_2 add "&2s=" add state_2 add "&2z=" add zip_2 add "&idx=0&id=410ed2bb-002ee-01b60-400c3301&aid=410ed2bb-002ef-01b60-400c3301";
Total ActionScript Errors: 1 Reported Errors: 1
those variables are not defined in your fla. you have textfields with instance names of address, city and zip but not variables that i could find.
try using address.text etc if you want to use the textfields' instance names.
ahh, I think is my good ol friend ", you have quotes inside a string............double quotes to be precise, try scaping or using the url encoding equivalent inside that url variable......
looking like this? I am really having a hard time with this one - I do not know why - think I have been looking at the screen to long - lol
" http://www.mapquest.com/directions/main.adp?go=1&do=nw&un=m&2tabval=address&cl=EN&ct=NA&1t abval=address&1y=US&1a=" add address add '&1c=' add city add '&1z=' add zip add '&2y=US' add '&2a=' add address_2 add '&2c=' add city_2 add '&2s=' add state_2 add '&2z=' add zip_2 add '&idx=0&id=410ed2bb-002ee-01b60-400c3301&aid=410ed2bb-002ef-01b60-400c3301';
your syntax error is because you're using add instead of + for string concatenation.
changing the "add" into "+" worked great and I also changed url to getURL and earased the trace(url).
It all seems to work now - thank you to everyone who helped with this problem I appriciate it guys!!!!!