MACROMEDIA FLASHLITE2 ACTIONSCRIPT-LANGUAGE Reference page 567

Actionscript language reference
Table of Contents

Advertisement

You can use the
return
the property you are watching. The value returned by your
the watched object property. The value you choose to return depends on whether you wish to
monitor, modify or prevent changes to the property:
If you are merely monitoring the property, return the
If you are modifying the value of the property, return your own value.
If you want to prevent changes to the property, return the
If the
method you define does not have a
callback
object property is assigned a value of
A watchpoint can filter (or nullify) the value assignment, by returning a modified
). If you delete a property for which a watchpoint has been set, that watchpoint does
oldval
not disappear. If you later recreate the property, the watchpoint is still in effect. To remove a
watchpoint, use the
Object.unwatch
Only a single watchpoint can be registered on a property. Subsequent calls to
on the same property replace the original watchpoint.
Object.watch()
The
Object.watch()
JavaScript 1.2 and later. The primary difference is the
addition to
Object.watch()
parameter to the event handler and use it in the event handler.
userData
The
Object.watch()
operate through lazy evaluation-- the value of the property is not determined until the
property is actually queried. Lazy evaluation is often efficient because the property is not
constantly updated; it is, rather, evaluated when needed. However,
evaluate a property to determine whether to invoke the
getter/setter property,
inefficient.
Generally, predefined ActionScript properties, such as
getter/setter properties and cannot be watched with
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- A string; the name of the object property to watch.
name:String
callback:Function
parameter is a function object, not a function name as a string. The form of
callback(prop, oldVal, newVal, userData)
statement in your
undefined.
method.
method behaves similarly to the
that Netscape Navigator does not support. You can pass the
method cannot watch getter/setter properties. Getter/setter properties
needs to evaluate the property constantly, which is
Object.watch()
- The function to invoke when the watched property changes. This
method definition to affect the value of
callback
callback
newVal
oldVal
statement, then the watched
return
Object.watch()
userData
callback
,
,
_x
_y
_width
Object.watch()
.
method is assigned to
parameter.
parameter.
newval
function in
parameter, which is a Flash
needs to
Object.watch()
function. To work with a
, and
, are
_height
.
callback
Object
(or
is
567

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASHLITE2 ACTIONSCRIPT-LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash lite 2

Table of Contents