Code.GeekInterview.com
 
Code Samples Flash
 

Detect Operating System


Code ResourceAuthor: lavanyarani  

Difficulty Level: Beginner

Published: 10th Nov 2009   Read: 2730 times  

Filed in: Flash
Add Comment


 

 

Sponsored Links


 

 
This code helps you to detect the operating system on which you are working.
 


Sample Code
  1. Step-1: Create an input box and give the name as “n”.
  2. Step-2: Create a button with the text on it “click”.
  3. Step-3: Select the button and open the action panel and write the
  4.              following code in the script pane.
  5.              on(release)
  6.             {
  7.                 var os:String=System.capabilities.os.substr(0,3);
  8. if(os=="Win")
  9. r1.text="windows";
  10. if(os=="Mac")
  11. r1.text="mac";
  12. if(os=="Lin")
  13. r1.text="Linux";
  14.            }
  15.  Step-4: press ctrl+enter to test the movie.
  16.  
Copyright GeekInterview.com


Next Article: Detect Flash Player Version


 

Latest Code Samples

 

Popular Code Samples

 

Related Code Samples

 

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    



Popular Coders

# Coder NameHits
1. lavanyarani32134

Active Coders

# Coder NameCodes
1. lavanyarani13

Refined Tags