views:

82

answers:

2

I have a flash map of the UK which is divided up into the counties, a user clicks on a county and is then directed to a new url, eg. www.mydomain.co.uk/region/london. The flash map remains on that new page in case they wish to select a new region.

What I want to know: is it possible to manipulate the flash so that if the url is www.mydomain.co.uk/region/london then london remains highlighted on the flash map. I presume I will have to use some AS which is fine as long as it is AS3.

+1  A: 

I'm not sure how familiar you are with writing your own AS3 scripts. The method I would use in this case is to fetch the URL of your browser, and to parse the location out of it.

See related question: http://stackoverflow.com/questions/396412/how-can-my-flash-app-determine-its-own-url

Alternatively you can have the individual county pages pass a variable to the Flash movie in the embed/object tag via the HTML.

nash
A: 

A simple way to do it using as3 alone would be to get the URL from the stage's loaderInfo object like so:

Stage.loaderInfo.url

A better but more difficult way to go about it would be to use swfAddress to set up deep linking, history, and other such browser normalities. http://www.asual.com/swfaddress/

greg