On Jul 17, 4:23 pm, "Abdul Qabiz" <abdul.qa...@gmail.com> wrote:
> Hi,
>
> If you try to serialize a custom-class-instance to SharedObject, it is
> serialized as AMF. Type information is lost so while retrieving the object
> it is returned as Anonymous Object. To allow SharedObject return object as
> instance of a class, you need to register the class-alias using
> flash.net.registerClassAlias (..). This API was known as
> Object.registerClass (..) in AS2.
>
> registerClassAlias (..) -http://livedocs.adobe.com/flex/201/langref/flash/net/package.html#reg...()
>
> I searched to see if someone has used before writing some code, I found an
> entry on Tushar's blog:-
>
> http://tush.wordpress.com/2007/07/08/actionscript-3-serializing-class...
>
> -abdul
>
> On 7/17/07, karan <karan.pra...@gmail.com> wrote:
>
>
>
>
>
> > Did you try this one
> > var newVOUser:UserVO = loginDetails.data.loginDetails as UserVO;
>
> > On 7/17/07, Vijay Khambalkar < vkhambal...@gmail.com> wrote:
>
> > > Hi all,
> > > I am facing issues with local SharedObject. I have code like this
>
> > > loginDetails = SharedObject.getLocal("loginDetails");
> > > var voUser:UserVO;
> > > loginDetails.data.loginDetails = voUser;
>
> > > I am storing the UserVO object into the data property of SharedObject.
> > > But when I tried it to get it back from the property in the following way
>
> > > var newVOUser:UserVO = UserVO(loginDetails.data.loginDetails);
>
> > > Its giving me the typecasting error. Why? any workaround to this
> > > problem?
>
> > > Thanks in advance
> > > Vijay Khambalkar
>
> > --
> > regards
> > karan
> > mindrulers.blogspot.com- Hide quoted text -
>
> - Show quoted text -