First I should preface this by saying that I'm quite new to Flash/AS!
Long story short, I'm working on a very basic quiz game in Flash. The user will be presented with questions and must choose an answer to proceed (whether they choose the right or wrong answer).
This will be used as a training tool at my work, and we need to be able to track users' answers to determine what people got right/wrong, who needs additional training, etc.
My initial thought is to utilize SharedObjects to gather their answers (since SO are user-specific, this seemed to make sense). My question though, is there a way to access the SO data and send an email, export a text file (or something) to the managers? Possibly store the clicks in an array and export that?
The other thing is that we don't want people to be able to retake the quiz (there's an incentive for getting 90%+ questions right). My other thought was that I could write some data to the SO once the user reaches the end-screen and can be checked against at login (to see if they've already finished the game).
Anyways, that's the problem I'm running into. If emailing/exporting SO data isn't an option, what other options are there?
First, a note on using SharedObjects to store any information of importance--in your case, storing whether the quiz was completed to prevent retaking: it's not fool-proof. Any user can delete or alter their shared objects, and you no longer have that data.
As far as tracking their answers and emailing them, that's completely doable. Storing them in a shared object is unnecessary unless you intend on letting the users take the quiz over the course of multiple sessions (partially completing the quiz, and returning to it at a later time). Anything you would store in a shared object during a single "session" could just as easily be stored in memory while the application is running.
Finally, you mentioned that you're using scenes. Most developers would recommend against that. It's an outdated mode of developing flash applications. If you're at a point in your development process right now where you can strip those out, I highly recommend you do.
Caveats aside, here is how you would do it:
In your other scenes, you can grab a reference to the shared object the same way as before:
SharedObject.getLocal("quiz");
and add data to it as the quiz proceeds.As for mailing the result, you have two options: