EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 616

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
616 Chapter 12: ActionScript Dictionary
Usage 3: This example uses a method of an object. You must use this syntax when you want to
call a method that is defined for an object.
obj = new Object();
obj.interval = function() {
trace("interval function called");
}
setInterval( obj, "interval", 1000 );
obj2 = new Object();
obj2.interval = function(s) {
trace(s);
}
setInterval( obj2, "interval", 1000, "interval function called" );
You must use the second form of the setInterval() syntax to call a method of an object,
as follows:
setInterval( obj2, "interval", 1000, "interval function called" );
See also
clearInterval()
, updateAfterEvent()
setProperty()
Availability
Flash Player 4.
Usage
setProperty(target, property, value/expression)
Parameters
target
The path to the instance name of the movie clip whose property is to be set.
property The property to be set.
value The new literal value of the property.
expression An equation that evaluates to the new value of the property.
Returns
Nothing.
Description
Function; changes a property value of a movie clip as the movie plays.
Example
This statement sets the _alpha property of a movie clip named star to 30% when the button
is clicked:
on(release) {
setProperty("star", _alpha, "30");
}
See also
getProperty

Table of Contents

Related product manuals