Loading ColorTransform from SharedObject

105 Views Asked by At

I'm using a local shared object (SharedObject) to store some data for my flash game.
One of the bits of data I'd like to save is a ColorTransform object. I have no problem saving the colorTransform to the sharedObject, but when I try to load it the game crashes. I'm saving and loading other types of variables at the same time as the colorTransform, and they save/load just fine... Has anyone else experienced this? Is there a solution floating around out there?

1

There are 1 best solutions below

0
On

Try using registerClassAlias() like this:

registerClassAlias('flash.geom.ColorTransform',flash.geom.ColorTransform);

before loading a ColorTransform out of your SharedObject, or saving it in there. Then your loading should work like this:

var myCT:ColorTransform=so.data.storedCT;