I've a problem with saving model into ShareObject and load it.
I try to save a model like the Template4 : Bundles with Levels.
Here is what i do in my model :
public var worlds : BindableArray = new BindableArray();
//a world contains a BindableArray with Levels
override public function load(data : Object) : void
{
_muteSounds.setValue(data.muteSounds);
worlds.setValue(data.worlds);
}
override public function save(data : Object) : void
{
data.muteSounds = _muteSounds.getValue();
data.worlds = worlds.getValue();
}
override public function sleep(data : Object) : void
{
GameGlobals.systemManager.saveModel(this);
}
In the data object I load, everything is correct but I don't find how to transform the data.worlds to a BindableArray of world with BindableArrays of Levels,...
Hello,
I've a problem with saving model into ShareObject and load it. I try to save a model like the Template4 : Bundles with Levels.
Here is what i do in my model :
In the data object I load, everything is correct but I don't find how to transform the data.worlds to a BindableArray of world with BindableArrays of Levels,...
How could I do this?
Thank's