flash google map directions
- Started
- Last post
- 9 Responses
- FallowDeer
Does anyone know how to make a submit field where people can enter in there postcode and it directs them to google maps using the direction facility. (so postcode to preset destination)
Its pretty easy to do as a html form.
But im just wondering if the method is the same for flash? tried looking for any examples but cant find any!
- acescence0
you need an input text field and a button that triggers a function which collects the value of the text field and inserts it into your google url, then makes a geturl call to that url.
- siaukia0
are you looking at as3? i can help by writing a tutorial later tonight when i'm back from work on that
- skt0
http://maps.google.com/maps?f=q&…
just create the above url with the 90026 being whatever zip code you need added to the end of it.
- FallowDeer0
AS2 siaukia, my brian cant cope with AS3 yet.
skt I want it so people will fill in a text field and a button which will launch google maps, but the "get directions" area, so it takes the postcode you just entered and creates directions to a preset address.
acescence has hit the nail on the head, but I wont have a clue how to do that
- maximillion_0
there is an API that makes this pretty easy to do but its AS3
- FallowDeer0
So is that AS3?
I hope it isnt as ive found the "Initiating Directions Requests"I think thats what im looking for!
- siaukia0
sigh, found a tutorial for you in as3 https://supergeekery.com/index.p…
but as2 might be some tutorial lurking around already,
- anxious_arms0
seems like, in AS2, you could create an input box and a submit button.
on submit a a variable is set to whatever is in the text box (post code) - then a simple function with a Get URL is triggered like this
var postCode = "";
function openGoogle()
{
postCode = your_input_variable;
getURL("the first part of the google maps url" + postCode + "end of url code")
}though, i didn't test. just off the top of my head and you won't need to use an API.
- thanks for this mate, gives me a point in the right directionFallowDeer
- ya, feel free to email me any specific questions...anxious_arms
- Thanks for the help chap!FallowDeer