Recipe 16.9 Reading Values from a Server-Side Shared Object

16.9.1 Problem

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

16.9.2 Solution

Use the SharedObject.getProperty( ) method.

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

16.9.4 See Also

Recipe 16.3, Recipe 16.8, and Recipe 16.10



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