Looking for some help catching flash as3 POST command with python.
Anyone done this? below is my AS3 Code:(I have on pretty good authority that this part is right)
function savedata(event:MouseEvent):void {
trace ("i've been clicked");
var myData:URLRequest = new URLRequest("user_info.py")
myData.method = URLRequestMethod.POST
var variables:URLVariables = new URLVariables()
variables.fullname = fullname.text
myData.data = variables
}
it points to the user_info.py which reads:
#this 'import' part is a guess
import POST
# Retrieve shared variables
mallvars = POST()
#Read a shared variable
fullname = mallvars.fullname
# Write a shared variable
import datetime
import time
#set the text file name
from time import strftime
the_time = strftime("%Y-%m-%d_%H.%M.%S")
myFile = "gal-01_"
myFile += str(the_time)
myFile += ".csv"
#Convert all captured variables to strings
w1 = str(fullname)
# Write Variables to file in CSV format
text_file = open('C:\%s' % myFile, "w")
text_file.write("Name, ")
text_file.write(w1)
text_file.write(" \n")
text_file.close()
Any help with an approach to this is appreciated.