Shared object - Save every variable in a level

I thought I found a way a long time ago that a person could save every variable present in a level of flash into a shared object without having to specifically define what each variable was and saving it individually. Does anybody know how to do this or have any tutorial links.