This content has been marked as final. Show 6 replies
Haven't done much with shared objects, but my understanding is that they can hold all the Flash data types. I just did a simple test with directly storing a date in a shared object. I was only trying it in the testing environment, but it was persistent between quitting and starting up Flash. So I'm pretty sure you can store those.
Sorry I can't help more. The whole AS2 notation is really impossible for me to follow and I'm not seeing where you are storing the dates.
The thing is, I'm not saving the dates directly. I have my own class type called SubjectClass.
Each SubjectClass has an ID, a date of birth, a string for school name, and an array for test records (this has another custom class in it)
The code in my original post alters the SubjectClass object, and then saves that object into the SharedObject. So the date is being saved indrectly. It works for the id number, and for the school string, but the date and the array return undefined.
you can't save an object in a shared object because the object doesn't exist outside your swf or as file.
So you're saying that because the date exists as an object inside another object, that the SharedObject only contains a pointer?
If that's so, then how do I get the sharedObject to store the date, while maintaining its relationship to the subjectClass object I created?
i said, you can't store an object outside of flash because the object doesn't exist outside of flash.
you can store any and all details about the object and recreate it from those details, but you can't store the object.
so, you can store any property of your date object (for example, its day, month, year etc properties) and you can use those properties to create a date object that has the same properties.