Skip navigation
Currently Being Moderated

Using XML to save data

May 12, 2011 9:01 AM

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

 
Replies
  • Currently Being Moderated
    May 12, 2011 1:18 PM   in reply to saratogacoach

    You can also use JSON , or serialize and save data to ByteArray , but for this to edit You will need another app to load binary data and uncompress it.

     
    |
    Mark as:
  • Currently Being Moderated
    May 12, 2011 10:29 PM   in reply to 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() )

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points