CLIENT-SIDE DETECTION


The code snippets in this section check on the client side to determine whether the Flash player is running on a Pocket PC 2002 device.

Flash

This ActionScript detects whether a Flash movie is running on the Flash Player 5 on a Pocket PC device.

 /*  *       This is a simple function added to the built in String object that checks  *       whether a String begins with the string passed into the function.  */  String.prototype.beginsWith = function(s)  {           return(s == this.substring(0, s.length));  }  var playerVersion = getVersion();  if(playerVersion.beginsWith("WINCE"))  {           //Pocket PC 2002 <u><b>Detected;  }  else  {           //Pocket PC 2002 NOT detected;  } 

Pocket Jscript

This Jscript code detects whether the HTML page/Jscript is being run in a browser on the Pocket PC operating system.

 *var strNav = navigator.userAgent;  // Check for Windows CE (Pocket PC, Palm-size PC, Handheld PC, Handheld PC Pro)         var isCE = strNav.indexOf("Windows CE");         if(isCE > -1)  {  //add Windows CE specific code         }         else  {  //add code for other platforms         }  // Check for Pocket PC         var isPPC = strNav.indexOf("240x320");  if(isPPC > -1)  {  // add Pocket PC specific code  }  else  {  // add code for other platforms  } 


Macromedia Flash Enabled. Flash Design and Development for Devices
Macromedia Flash Enabled. Flash Design and Development for Devices
ISBN: 735711771
EAN: N/A
Year: 2002
Pages: 178

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net