Recipe 16.3 Reading Values from a Client-Side Shared Object

16.3.1 Problem

You want to read values from a client-side shared object (either a remote or local shared object).

16.3.2 Solution

Read the values from the properties of the shared object's data property.

16.3.3 Discussion

There is nothing difficult about reading the values from a client-side shared object. All persistent values are stored in the shared object's data property, so you simply read the values from the data property, as follows:

// Read the value of myProperty from the shared object, mySO, and write it to the // Output window. trace(mySO.data.myProperty);

16.3.4 See Also

Recipe 16.2. Also refer to Recipe 16.9 for important differences when reading data from a remote shared object.



ActionScript Cookbook
ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application Developers
ISBN: 0596526954
EAN: 2147483647
Year: 2005
Pages: 425

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