![MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference Download Page 54](http://html.mh-extra.com/html/macromedia/flash-8-actionscript-2-0-language/flash-8-actionscript-2-0-language_reference_687537054.webp)
54
ActionScript language elements
Parameters
expression
:Object
- The name of a variable, property, object, or movie clip to retrieve. This
parameter can be either a String or a direct reference to the object instance (i.e use of
quotation marks (" ") is optional.)
Returns
Object
- A value, reference to an object or movie clip, or
undefined
.
Example
The following example uses
eval()
to set properties for dynamically named movie clips. This
ActionScript sets the
_rotation
property for three movie clips, called
square1_mc
,
square2_mc
, and
square3_mc
.
for (var i = 1; i <= 3; i++) {
setProperty(eval("square"+i+"_mc"), _rotation, 5);
}
You can also use the following ActionScript:
for (var i = 1; i <= 3; i++) {
this["square"+i+"_mc"]._rotation = -5;
}
See also
Array
,
set variable statement
fscommand function
fscommand(command:String, parameters:String) : Void
Lets the SWF file communicate with either Flash Player or the program that is hosting Flash
Player, such as a web browser. You can also use the
fscommand()
function to pass messages to
Macromedia Director, or to Visual Basic (VB), Visual C++, and other programs that can host
ActiveX controls.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...