Flex 2 serializes lso's as AMF3. Flex 1.5 as AMF0. SharedObject.defaultObjectEncoding = ObjectEncoding.AMF0; var cookie:Object = SharedObject.getLocal("foo", "/").data;
You have to know the encoding before you try to access the lso. Get it wrong and the lso is deleted. Kinda harsh. --- In flexcoders@yahoogroups.com, "Ed" <[EMAIL PROTECTED]> wrote: > > I have two Flex Applications: one is a Flex 1.5 App, the other a Flex > 2 App. Both want to access the same local SharedObject (lso). > > SharedObject.getLocal("foo", "/") > > Both Apps are running on the same domain. > > When I load the Flex 1.5 App, it accesses and reads the lso correctly. If > I then load the Flex 2 App, I get an error every time I try to access > the lso. > > Error.toString(): > > (RangeError) > message: Error #2006: The supplied index is out of bounds. (*) > name: RangeError (*) > errorID: 2006 (int) > > Error.getStackTrace(): > > RangeError: Error #2006: The supplied index is out of bounds. > at flash.net::SharedObject$/getLocal() > at <-- snip --> > > After this error, the lso is cleared. When the original Flex 1.5 app > tries to access it, it's empty. The corresponding .sol file in my > "Application Data" dir is deleted. > > It happens even if both apps are not running simultaneously. As long > as the Flex 1.5 App accesses it first, the Flex 2 app can't. > > The same error doesn't happen between 2 Flex 1.5 Apps or 2 Flex 2.0 Apps. >