Hi,
I am planning an eLearning project for an AS3 version of a family health history diagram (pedigree/genogram). A major consideration would be whether the diagram (created by the user by their inserting square, circle, other symbols, connecting lines, text labels, etc.) can be saved and re-opened for editing, so the user can build their family health history diagram, edit, change/add to it over time.
I've seen XML mentioned as a possible method for saving data and wondered if it (maybe by adding a server-side script-ASP, PHP) can save/re-open for editing, x,y positions of shapes, line positions, angles, length, type, etc. An SO could also work, but I'm not sure if 100 kb is enough for this data (if the Max storage is not changed in player settings, by each user).
I would appreciate any clarification so I can figure out if the project can work in AS3 and if yes, how to begin this challenging task.
Regards,
saratogacoach
JSON is only a string , looks similar to objects You write in flash , You can find some encoders where You just put string and You will get serialized objects .
With ByteArray , You just create new , using writeObject(YourObject) , compress , and thats all . You have Your data in AMF format ready to store.
Php can save it on server as file , You will get it by URLLoader , uncompress , readObject and data ready to use . (If You using Your classes , You will have to registerClassAlias() )
Hi turbosqqel,
Thanks for the additional explanation. That sounds more doable for me.
What I can try next, is to set up a small working 'test of concept' sample in AS3, that can take 2 data items (for example, posX=100, posY=200), save their values (100 and 200) to XML with the help of a PHP script, then see if I can get the Flash sample to retrieve these 2 values (ultimately for use in re-positioning a shape at 100,200 when the SWF is booted up). Whew!
But if I can do something like that first, then I will have a model to build on for data storing/retrieving.
I'll look around online for any AS3, PHP basic samples like that. Maybe won't have to 're-invent the wheel.' ![]()
Again, thanks for your help.
Regards,
North America
Europe, Middle East and Africa
Asia Pacific