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
as follows:
setInterval( obj2, "interval", 1000, "interval function called" );
See also
clearInterval()
setProperty()
Availability
Flash Player 4.
Usage
setProperty(target, property, value/expression)
Parameters
The path to the instance name of the movie clip whose property is to be set.
target
The property to be set.
property
The new literal value of the property.
value
An equation that evaluates to the new value of the property.
expression
Returns
Nothing.
Description
Function; changes a property value of a movie clip as the movie plays.
Example
This statement sets the
is clicked:
on(release) {
setProperty("star", _alpha, "30");
}
See also
getProperty
616
Chapter 12: ActionScript Dictionary
setInterval()
,
updateAfterEvent()
property of a movie clip named
_alpha
syntax to call a method of an object,
to 30% when the button
star
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?