A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: detect current url window

  1. #1
    Member
    Join Date
    Sep 2001
    Location
    Málaga, Spain
    Posts
    98

    detect current url window

    hi,
    is it possible to have the flash detect the current html window?
    I'm NOT asking for just the domain nor the swf file's location (_url property).

    My purpose is to have a "language button" always available in a website and redirect the browser to a url which is the same but in another language.

    thanks for the help

  2. #2
    Member
    Join Date
    Mar 2004
    Posts
    40
    Could you explain this a bit more?
    Ooh, food!

  3. #3
    Senior Member
    Join Date
    Jul 2002
    Location
    Slovenia
    Posts
    193
    You may try using the JavaScript - I'm sure JavaScript can tell which url you are at, or whatever you want.

    I can merely support you with the actionscript:

    1. This would be in a button:
    code:
    on(release){
    fscommand("redirectToLanguage", "english")

    }



    2. This would be in the html file (JavaScript):
    Code:
    function myDocument_DoFSCommand(command, args) {
      if (command == "redirectToLanguage") {
        // Do whatever you want here...
      }
    }
    I will search a little in javascript manuals or so... but I'm quite bad at JavaScript...

  4. #4
    Member
    Join Date
    Mar 2004
    Posts
    40
    Ok so you want flash to detect what language that person is using? If so then you might want to just have a picture of all the flags of the languages you have and let them pick one.
    Ex.
    on(press) {
    getURL("www.mysite.com/english/",_self);
    }
    on(press) {
    getURL("www.mysite.com/french/",_self);
    }
    Ooh, food!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center