This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Macromedia Flash > November 2003 > Actionscript: OS detect??
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Actionscript: OS detect??
|
|
| veronique 2003-11-30, 12:41 pm |
| Anyone has some idea on the neccesary actionscript lines to detect which OS
the standalone player is running on?
Need this to fire one external action if XP, another if all other Windows,
and yet another if Mac.
I can find the Flash-version-detects everywhere, but OS-detects?
Thanx!
Veronique
| |
| urami_ 2003-11-30, 12:41 pm |
|
quote:
> Anyone has some idea on the neccesary actionscript lines to detect which OS
> the standalone player is running on?
> Need this to fire one external action if XP, another if all other Windows,
> and yet another if Mac.
>
> I can find the Flash-version-detects everywhere, but OS-detects?
function VersionInfo()
{
total = _root.$version;
os = total.substr(0,4);
playerSeria = total.substr(4,1);
playerVersion = total.substr(8,2);
trace("total: "+total);
trace("os: "+os);
trace("playerSeria: "+playerSeria);
trace("playerVersion: "+playerVersion);
}
VersionInfo();
Regards
urami_*
<lsym>
There's no place like 127.0.0.1
</lsym>
| |
| veronique 2003-11-30, 12:41 pm |
| Hi Urami,
I'm well-known with the $version variable, but my problem is I need more
than just "Win" or "Mac".
I actually need the version of Win, to make the diference between XP and
before.
As far as I'm aware, $version cannot provide me with that info.
Any other ideas?
Veronique
"urami_" <noSpam@FlashFugitive.com> wrote in message
news:3FC75061.9022E876@FlashFugitive.com...quote:
>
>
OS[QUOTE][color=darkred]
Windows,[QUOTE][color=darkred]
>
>
> function VersionInfo()
> {
> total = _root.$version;
> os = total.substr(0,4);
> playerSeria = total.substr(4,1);
> playerVersion = total.substr(8,2);
> trace("total: "+total);
> trace("os: "+os);
> trace("playerSeria: "+playerSeria);
> trace("playerVersion: "+playerVersion);
> }
> VersionInfo();
>
>
>
> Regards
>
> urami_*
>
>
>
> <lsym>
>
> There's no place like 127.0.0.1
>
> </lsym>
| |
| Dave Millen 2003-11-30, 12:41 pm |
| On Fri, 28 Nov 2003 16:34:46 +0100, veronique wrote:
quote:
> Hi Urami,
>
> I'm well-known with the $version variable, but my problem is I need more
> than just "Win" or "Mac".
> I actually need the version of Win, to make the diference between XP and
> before.
> As far as I'm aware, $version cannot provide me with that info.
>
> Any other ideas?
>
> Veronique
>
You can use the HTTP_USER_AGENT server variable, but I don't think you can
access it from action script. You will probably have to use PHP or asp to
access it and extract the required information and return it to a
loadVariables call.
HTTP_USER_AGENT returns the following on Linux, Windows 98 and XP.
########################################
Linux:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030425
############################################
Windows 98:
Mozilla:
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1b) Gecko/20020721
Internet Explorer 5:
Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
############################################
Windows XP:
Mozilla:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/2003031
Internet Explorer 6:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
############################################
A bit of programming should be able to pull the third parameter from the
string and return os=<your required id string> to loadVariables().
HTH,
Dave
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|