what kind of app? web-based? projector? air?
Sorry. I've create a small flash animation with 8 buttons
will you be publishing an html and swf file to deploy on the internet?
That's correct. We will be hosting the .swf and html on a web server which supports PHP, Zend Framework, Perl, Python, Ruby, SSI programming.
Basically I have a few buttons which Alpha in sequentially (very basic I know) over 10 seconds stored in a movie clip on my stage which link off to different URL's. I have the button's linking perfectly using getURL (on click). What I want to do is track what button is pressed and when (date and time stamped) in a .CSV which I was hoping to store on the same web server. I have been reading I need to use .PHP in the HTML code so flash can talk to the .PHP which will then write to the .CSV file. Does that sound right? If so I don't have the foggist on how to do it? Any help would be most appreciated.
Thanks in advance for your help.
1 person found this helpful
you can use the LoadVars class to send your csv string to a php file that will then save your file on your server. your actionscript will look like:
var sendLV:LoadVars=new LoadVars();
var receiveLV:LoadVars=new LoadVars();
// do something is save is success/fail
and your php file:
$yourfile = "yourcsvfilename.txt";
$fh = fopen($yourfile, 'a') or die("can't open file"); // assuming you want to append data use this, but check if there's already data and separate old and new data with a comma
$stringData = $_POST['csv'];