Add a RemoteClass metadata tag to the custom class: Example at the bottom of the article http://cookbooks.adobe.com/post_How_to_keep_the_type_of_your_objects_when_serializ-8323.html
----- Original Message ----- From: "Geoffrey" <[email protected]> To: <[email protected]> Sent: Wednesday, October 28, 2009 12:45 PM Subject: [flexcoders] SharedObject problem/bug? Cannot store a subclass of ByteArray. > Hi, > > I have a subclass of ByteArray (let's call it ByteArrayPlus), which I want to > write to a SharedObject. I can store it fine, but > when I read it back, it says it's of type ByteArray, not ByteArrayPlus. Does > anyone have an idea what may be wrong? Has anyone > gotten this to work? > > FYI, I am already using registerClassAlias(). And it works fine with a custom > class, and with a custom class extending another > custom class. I also tried implementing IExternalizable, but that did not > help. I also tried [RemoteClass] and > [RemoteClass(alias="ByteArrayPlus")]. > > Also, ByteArrayPlus is really simple: I only added a String (name) to it. > > This is my first post to FlexCoders. > > Any help appreciated. > > --Geoff >

