NIET
Would you like to react to this message? Create an account in a few clicks or log in to continue.
LATEST NEWS
HI FRIENDS...!








WELCOME TO NIET GALAXY








KEEP VISITING...!








IT IS FOR NIET STUDENTS
FOLLOW ME
ActionScript program for Detecting the Operating System Twit_05
NOTICE BOARD...!!!
Latest topics
» Beautiful Brides
ActionScript program for Detecting the Operating System EmptyMon Sep 14, 2009 12:07 pm by NIETGALAXY

» Bollywood actresses In Sarees
ActionScript program for Detecting the Operating System EmptyMon Sep 14, 2009 12:05 pm by NIETGALAXY

» Childhood photos of Bollywood stars
ActionScript program for Detecting the Operating System EmptyMon Sep 14, 2009 12:02 pm by NIETGALAXY

» How to Use the Secret
ActionScript program for Detecting the Operating System EmptySat Sep 05, 2009 1:35 pm by NIETGALAXY

» How to Be A Teacher's Pet
ActionScript program for Detecting the Operating System EmptySat Sep 05, 2009 1:28 pm by NIETGALAXY

» How to Get into the Habit of Studying for a Test
ActionScript program for Detecting the Operating System EmptySat Sep 05, 2009 1:24 pm by NIETGALAXY

» Vodafone Free GPRS hack
ActionScript program for Detecting the Operating System EmptyTue Aug 18, 2009 8:31 pm by anil kumar

» How To Get Big Arms?
ActionScript program for Detecting the Operating System EmptyTue Aug 18, 2009 8:24 pm by anil kumar

» Airtel GPRS hack
ActionScript program for Detecting the Operating System EmptyTue Aug 18, 2009 8:20 pm by anil kumar


ActionScript program for Detecting the Operating System

Go down

ActionScript program for Detecting the Operating System Empty ActionScript program for Detecting the Operating System

Post by NIETGALAXY Wed Jul 29, 2009 7:49 pm

Record 6:
6. Detecting the Operating System
-------------------------------------------------------------
Aim:

You want to know the operating system under which the Flash movie is being played, perhaps to indicate which operating systems are not supported or to implement a platform-specific feature.

Solution:
Use the $version or System.capabilities.os property.
we saw that the $version property string includes the operating system on which the Player is running. The operating system can be either "MAC", "WIN", or "UNIX".

playerParts = _level0.$version.split(" ");
switch (playerParts[0]) {
case "MAC":
gotoAndStop ("WelcomeMac");
break;
case "WIN":
gotoAndStop ("WelcomeWindows");
break;
case "UNIX":
gotoAndStop ("WelcomeUnix");
}
As of Flash 6, you can use the System.capabilities.os property, which returns a string indicating the operating system and version name. Possible values include "Windows XP", "Windows 2000", "Windows NT", "Windows 98/Me", "Windows 95", and "Windows CE". On the Macintosh, the string includes the version number, such as "MacOS 9.2.1" or "MacOS 10.1.4".

You can make design choices based on the operating system. For example, your movie might load different assets depending on the user's operating system, or you may simply want to record the operating systems of the users who view your movies for statistical analysis.

If all you care about is the general platform type instead of the specific version, you can check just the first three letters of the string, as follows:

os = System.capabilities.os.substr(0, 3);
if (os == "Win") {
// Windows-specific code goes here.
} else if (os == "Mac") {
// Mac-specific code goes here.
} else {
// Must be Unix or Linux
}

--------------------------------------------------------------------------
Program
--------------------------------------------------------------------------
var playerparts=_root.$version.split(" ");

var playeros=playerparts[0];

trace("the player operating system="+playeros);

--------------------------------------------------------------------------
Output


the player operating system=WIN
NIETGALAXY
NIETGALAXY
Admin

Posts : 401
Join date : 2009-07-03
Location : GUNTUR

https://niethangout.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum