alexplanation
alexplanation

Reputation: 1498

Data Collection and Transfer from Local Flash File

I have inherited a large flash script (written in AS2) which runs an experiment and saves data using the SharedObject framework. This script will be given to users to run on their local machines, probably on a USB drive or a CD. What is the easiest way to transfer the locally stored SharedObject either to this USB drive or to send it electronically? Is it possible to store the SharedObject in the same location as the swf file (e.g., on the USB drive?) I see that hooking up flash with PHP is possible, but is there a purely flash way to send this data via email, ftp or another protocol to a server?

Upvotes: 1

Views: 413

Answers (2)

net.uk.sweet
net.uk.sweet

Reputation: 12431

You can save a file to the local file system in ActionScript 2.0 with the FileReference.save() method. This opens a dialogue box which allows the user to save the file to a location of their choice. You would be free to choose the most appropriate format for the outputted data.

Upvotes: 1

Sunil D.
Sunil D.

Reputation: 18193

I would avoid trying to use the file(s) that contain the SharedObject data. Even if you copied these files to a USB drive, you'd then have to write an app that knows how to open each one and get the data out. SharedObject data is user specific, so it's not clear how that later process would work.

Unfortunately, I don't have any knowledge of programming in AS2 -- only AS3.

For the most part, in Actionscript use HTTP to send data to the server. There are other ways, but this is obviously the most straight forward means.

If you were programming in AS3, you could use the URLLoader, URLRequest, URLVariables classes together to do an HTTP POST or GET to the server.

Here's some links I found on doing HTTP POST/GET with AS2:

Upvotes: 1

Related Questions