client got a project back from another programmer who wrote it in as2 (i don't know why) I just need to add in some tracking code for button clicks to the fla file. here's the code that's currently in as3 that needs to go to as2:
var trackingURL:String = "";
var variables:URLVariables = new URLVariables();
// TODO: Insert Event-specific fields below
variables.value1开发者_StackOverflow = "";
variables.value2 = "";
var request:URLRequest = new URLRequest(trackingURL + "?cacheKiller=" + (new Date()).getTime());
request.data = variables;
request.method = URLRequestMethod.POST;
var loader:URLLoader = new URLLoader();
loader.load(request);
var trackingURL = "";
var trackInfo = new LoadVars();
trackInfo.value1 = "";
trackInfo.value2 = "";
var myDate = new Date();
trackInfo.send(trackingURL + "?cacheKiller=" + (myDate.UTC), "_self", "POST");
You obviously need to populate trackingURL, value1 and value2
精彩评论