Hi,
There is a way to detect the browser version in the html file?
I wanna do something like this:
if language == us
load us.swf
else if language == jp
load jp.swf
thks!
Hi,
There is a way to detect the browser version in the html file?
I wanna do something like this:
if language == us
load us.swf
else if language == jp
load jp.swf
thks!
You COULD do it in Javascript, but I think it would be easier to do it in Flash.
You can use the System.capabilities feature in Flash MX to detect the browser language and load in the correct movie via loadMovie()…
An example would be like this…
[AS]var lang = System.capabilities.language;
if (lang == “en”) {
clip.loadMovie(“en.swf”);
} else if (lang == “jp”) {
clip.loadMovie(“jp.swf”);
}[/AS]
If you are going to have it as en.swf and jp.swf, etc you can save yourself the if statements and just do
[AS]clip.loadMovie(System.capabilities.language+".swf");[/AS]
If you still want Javascript heres an example of how to determine browser language via that…
http://javascriptkit.com/script/script2/language.shtml
Which one do you think is easier?
:: Copyright KIRUPA 2024 //--