742
ActionScript classes
stringIDArray (Locale.stringIDArray property)
public static stringIDArray : Array [read-only]
An array containing all the string IDs in the FLA file. The string IDs are not sorted
alphabetically.
Availability:
ActionScript 2.0; Flash Player 8
Example
The following example traces the
Locale.stringIDArray
property for the currently loaded
language XML file. Click the Settings button in the Strings panel to open the Settings dialog
box. Next, you add two active languages: English (en) and French (fr), set the replace strings
radio control to
"via ActionScript at runtime"
, and click OK. In the Strings panel, you
add a string ID of
IDS_GREETING
, and then add text for each active language.
import mx.lang.Locale;
Locale.setLoadCallback(localeCallback);
Locale.loadLanguageXML("fr");
function localeCallback(success:Boolean) {
trace(success);
trace(Locale.stringIDArray); // IDS_GREETING
trace(Locale.loadStringEx("IDS_GREETING", "fr")); // bonjour
}
Math
Object
|
+-Math
public class
Math
extends Object
The Math class is a top-level class whose methods and properties you can use without using a
constructor.
Use the methods and properties of this class to access and manipulate mathematical constants
and functions. All the properties and methods of the Math class are static and must be called
using the syntax
Math.method(
parameter
)
or
Math.constant
. In ActionScript, constants
are defined with the maximum precision of double-precision IEEE-754 floating-point
numbers.
Several Math class methods use the measure of an angle in radians as a parameter.You can use
the following equation to calculate radian values before calling the method and then provide
the calculated value as the parameter, or you can provide the entire right side of the equation
(with the angle's measure in degrees in place of
degrees
) as the radian parameter.
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...