
Object.watch() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
732
|
ActionScript Language Reference
Returns
The internally defined primitive value of someObject, if a primitive value is associated with
someObject. If no primitive value is associated with someObject, then someObject itself is
returned.
Description
The valueOf() method returns the primitive datum associated with an object, if such an
association exists. This method is most commonly used with instances of the Number,
String, and Boolean classes, which all have associated primitive data. It is rarely necessary
to invoke valueOf() explicitly; it is automatically invoked by the interpreter whenever
someObject is used where a primitive is expected.
See Also
Boolean.valueOf(), MovieClip.valueOf(), Number.valueOf(), Object.toString(),
String.valueOf()
Object.watch() Method
create a watchpoint to moderate property assignment
Flash 6
someObject.watch(prop, callback, userData)
Arguments
prop A string indicating the name of the property to watch on someObject. The
name must adhere to the rules for creating an identifier, outlined under
“Identifiers” in Chapter 15.
callback A function called whenever a value assignment attempt is made on
prop. The
function return value becomes the actual value assigned to the property.
userData An arbitrary data value passed to
callback.
Returns
A Boolean; ...