3 Replies Latest reply on Jul 1, 2008 6:05 AM by DIY_Lobotomy

    Read part of a URL with ActionScript?...

    DIY_Lobotomy Level 1
      Hello. I was wondering if it's possible to read a part of a URL with ActionScript...

      ...For instance, if I have three country-specific websites:

      * www.somewebsite.com
      * www.somewebsite.com.uk (united kingdom)
      * www.somewebsite.com.ca (canada)

      I just want to make one Flash file that I can load onto all three sites, but depending on which site is pulled up, the file will do something different. So (in plain english) I'd want to say:

      If the URL has ".uk", do something.
      If it has ".ca", do something else.
      If it has neither, do a third thing.

      How would I write that in ActionScript, or is it even possible to read the URL of the page that the .swf movie is playing on?...