
SharedObject Object
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
760
|
ActionScript Language Reference
Description
The legacy setProperty() function assigns value to one of movieClip’s built-in Flash 4 prop-
erties. It cannot be used to set the value of custom (i.e., user-defined) properties or
properties added to MovieClip in Flash 5 or later. In Flash 4, setProperty() was the only
means to assign movie clip property values; as of Flash 5, the dot and
[] operators are the
preferred means of setting both built-in and custom movie clip properties.
Example
// Flash 4 syntax: Rotate the main movie by 45 degrees:
setProperty("_root", _rotation, 45);
// Flash 5 and later syntax: Also rotates the main movie by 45 degrees:
_root._rotation = 45;
See Also
getProperty(); “The ‘Objectness’ of Movie Clips,” in Chapter 13; Appendix C
SharedObject Object
local data storage and remote data transmission
Flash 6
Constructor
None; instances are created with getLocal() or getRemote().
Properties
data Container for the SharedObject’s data.
Methods
close() Closes the connection between a remote shared object and Comm Server. See
the Comm Server documentation.
connect() Connects to a remote shared object on Comm Server. See the Comm Server
documentation.
flush() Forces data to be written to disk.
getLocal() Returns a reference to a specified local SharedObject instance. ...