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.9. Reading Values from a Server-Side Shared Object

Problem

You want to read values from a server-side shared object.

Solution

Use the SharedObject.getProperty( ) method.

Discussion

You cannot read from a server-side shared object the same way you can from a client-side shared object. Use the SharedObject.getProperty( ) method to read from a server-side shared object. This method requires that you specify the name of the property to read, and it returns the value of that property.

// This code should be within an .asc file. It retrieves the value of myProperty and
// assigns that value to the variable myPropertyVar.
myPropertyVar = my_r_so.getProperty("myProperty");

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