Hi,
I’m Cesar and I am new here and after several hours of trying to resolve this problem, I have joined Kirupa forum to see if I can find any help. Without much ado, here is my dilema…
I have a simple script in flash CS3 (9 AS 2.0) that sends variables to a php5 script and then accepts the response from the php5 script and places those vars into text fields.
what my problem is that when flash accepts those variables, from php5, it literally takes what is passed. that is in my php5 script I have:
print “&rMonth=$rMonth&”;
when displaying in flash, the “dynamic text” field shows: “$rMonth”.
if I replace $rMonth with “How Are You”, I see “How Are You”.
when I run the php5 script in a cmd shell, the values are displayed correctly. $rMonth displays “06”.
I am running this project locally on my computer.
I have installed apache, with MySQL db (where I am getting the values from). Flash 9 with AS 2.0. Php5.0.
just for show, here is the flash script, with some editing of course:
function getTipofMonthData(Mn, Yr) {
// create empty movie clips to temporarily send and hold values from the php script
var send_lv:LoadVars = new LoadVars();
var receive_lv:LoadVars = new LoadVars();
// on success of the load of variables do the following.
// all text fields are 'dynamic text' fields - error handling was removed
receive_lv.onLoad = function(success:Boolean) {
month_txt.text = receive_lv.rMonth;
headline_txt.text = receive_lv.headline;
paragraph_mc.paragraph_txt.text = receive_lv.paragraph
signature_txt.text = receive_lv.signature;
firstMonth = receive_lv.firstMo;
firstYear = receive_lv.firstYr;
}
//variables to send to the php script to get results.
send_lv.mV = Mn;
send_lv.yV = Yr;
send_lv.sendAndLoad("phpScriptHere.php5", receive_lv, "POST");
here is the php script - edited.
print “&rMonth=$rMonth&headline=$headline¶graph=$para&signature=$signature&firstMo=$firstMo&firstYr=$firstYr&”;
Any help would be appreciated…
Thank You Very Much (in advance)…