O'Reilly logo

Actionscript Cookbook by Joey Lott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

16.3. Reading Values from a Client-Side Shared Object

Problem

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

Solution

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

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

See Also

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required