I'm a newbie to flash. Dont know ABC's even. I was working on a PHP proj when the client gave me a flash file and asked to change the URL called for action. I have provided the actionscript snippet below...
function btnConfirmClick() {
getVars = new LoadVars();
sendVars = new LoadVars();
getSession = new LoadVars();
getSession.load("test.txt");
sendVars.PHPSESSID = getSession.phpsessionid;
sendVars.namestring = myNameIs_str;
sendVars.imagearray = '';
sendVars.dedication = dedication_str;
for (var i=1; i<myNames_array.length; i++) {
if (i>1) sendVars.imagearray += ",";
for (var j=1; j<myNames_array[i].length; j++) {
if (i>1 || j>1) sendVars.imagearray += ",";
l_str = myNames_array[i][j].whichLetter.toLowerCase();
o_str = myNames_array[i][j].whichOption;
sendVars.imagearray += l_str + "_" + o_str + ".jpg";
}
}
getVars.onload=function(scriptResponse) {
// connector.php will send back string 'success' for variable scriptResponse if the
// validation of the posted variables is successful. otherwise, it will return an error code
// that is to be handled by error.php.
if (getVars.scriptResponse == "success") {
getURL("javascript:launchCart('" + getVars.bookid + "', '" + myNameIs_str + "')");
// then go home <or not>
gotoAndPlay('Scene 1',1);
} else getURL("http://mni.athilakshmiinc.com" + getVars.scriptResponse);
}
sendVars.sendAndLoad("http://mni.athilakshmiinc.com/connector.php", getVars, "POST");
}
In the above code, http://mni.athilakshmiinc.com is the URL i'm supposed to change to a diff URL..I modified but although connector.php always returns "success", javascript launchCart is not invoked..
Please help me....

New Topic/Question
Reply


MultiQuote




|