MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 385

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

Example
The following is an example of using
myObject = { name:'Tara', age:27, city:'San Francisco' };
for (name in myObject) {
trace ("myObject." + name + " = " + myObject[name]);
}
The output of this example is as follows:
myObject.name = Tara
myObject.age = 27
myObject.city = San Francisco
The following is an example of using the
particular type of child:
for (name in my_mc) {
if (typeof (my_mc[name]) = "movieclip") {
trace ("I have a movie clip child named " + name);
}
}
The following example enumerates the children of a movie clip and sends each to Frame 2 in their
respective Timelines. The
_RedRadioButton_
for (var name in RadioButtonGroup) {
RadioButtonGroup[name].gotoAndStop(2);
}
fscommand()
Availability
Flash Player 3.
Usage
fscommand("command", "parameters")
Parameters
A string passed to the host application for any use or a command passed to
command
Flash Player.
A string passed to the host application for any use or a value passed to Flash Player.
parameters
Returns
Nothing.
Description
Function; allows the SWF file to communicate with either Flash Player or the program hosting
Flash Player, such as a web browser. You can also use the
Macromedia Director, or to Visual Basic, Visual C++, and other programs that can host
ActiveX controls.
for..in
typeof
RadioButtonGroup
,
_GreenRadioButton_
to iterate over the properties of an object:
operator with
for..in
movie clip is a parent with several children,
and
_BlueRadioButton
fscommand
to iterate over a
.
action to pass messages to
fscommand()
385

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Questions and answers

Table of Contents