PDA

View Full Version : Record and play again (but later)



z3r0
May 5th, 2004, 11:39 AM
Hello!
Please hear patiently:

I have a frame by frame secuence and a player to play, stop , rewind it.
Works ok, we are all happy.

BUT: now I need to do something else with it, that swf movie will be seen by a final user in a common browser. A new functionality is required:

The user must be able to play it (no problem)
pause it some x time (guess no problem)
and that execution has to be recorded so we can see it again in another session (big problem) :(

I need to be able to record in some way the user choices (if he stopped, paused and so on) but not only that, I need to be able to play again those movements.

I've seen many flas with cursor tracking (you record and then play it again), the problem is that if you reload the browser or quit those results are not available again...

Do I need a database? Is there any open source available out there with somehting similar? Any ideas? :q:

Thank you!

jbum
May 5th, 2004, 09:19 PM
I think a database (a server-side database) would be overkill for something like this. But then again, I think databases are often overused &| abused.

If I were doing it, I would save the user's actions in an array (each array element would contain an action-code (0=play,1=pause, etc) and a duration in milliseconds, which you can compute using getTimer() when you are recording the users actions.

I would implement my record/playback functionality to save actions & durations to the array, and then to use the array to control the behavior of the 'tapedeck' or whatever it is you are controlling.

I would save the array contents on the user's machine using the shared object. When the user comes back to the site, the shared object would be used to retrieve the last contents of the array.

A server-side solution is only necessary if you desire the user to be able to save a session on one machine, and retrieve it on another machine (in which case, you're going to have to set up user accounts, and all manner of other not-so-fun stuff).

z3r0
May 6th, 2004, 02:37 PM
Thank you, sounds good. Do you have any example or open source to poke around?