Adobe FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 Manual page 446

Programming actionscript 3.0
Table of Contents

Advertisement

}
capDP.sortOn("name", Array.CASEINSENSITIVE);
return capDP;
}
The
getBrowserObjects()
navigator object. If this array has a length of one or more items, the array of browser
capabilities (
) is appended to the arrray of Flash Player capabilities (
navArr
entire array is sorted alphabetically. Finally, the sorted array is returned to the main
application file, which then populates the data grid. The code for the
method is as follows:
private static function getBrowserObjects():Array
{
var itemArr:Array = new Array();
var itemVars:URLVariables;
if (ExternalInterface.available)
{
try
{
var tempStr:String = ExternalInterface.call("JS_getBrowserObjects");
itemVars = new URLVariables(tempStr);
for (var i:String in itemVars)
{
itemArr.push({name:i, value:itemVars[i]});
}
}
catch (error:SecurityError)
{
// ignore
}
}
return itemArr;
}
If the External API is available in the current user environment, Flash Player calls the
JavaScript
JS_getBrowserObjects()
object and returns a string of URL-encoded values to ActionScript. This string is then
converted into a URLVariables object (
returned to the calling script.
446
Client System Environment
method returns an array of each of the propreties in the browser's
method, which loops over the browser's navigator
) and added to the
itemVars
), and the
capDP
getBrowserObjects()
array, which is
itemArr

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents