1

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.

Gabriel Hurley
  • 39,690
  • 13
  • 62
  • 88
Udders
  • 6,914
  • 24
  • 102
  • 194
  • What you are looking for is a [sitelock](http://stackoverflow.com/questions/791352/how-to-site-lock-a-flash-application)? – qwerber Aug 06 '11 at 23:58

2 Answers2

1

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: 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.

Community
  • 1
  • 1
nash
  • 2,181
  • 15
  • 16
0

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/

greggreg
  • 11,945
  • 6
  • 37
  • 52