Object.valueOf( ) Method

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
Object.valueOf( ) Method Flash 5

the primitive value of the object
someObject.valueOf()

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( )



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net