swf and php
Posted: Fri Dec 05, 2003 8:43 pm
hello; I have swf:
------------------------------------------
var pass_word = "nil";
p_w_m = new LoadVars(); // p_w_m = pass_word_mover
_root.button_instance.onPress=function()
{ p_w_m.input_pass_word = input_instance.text;
p_w_m.send("pass_word_checker.php","this" ;
};
p_w_m.onLoad = function(success)
{ _root.output_instance._xscale =160; //this is a test
pass_word = this.true_or_false;
};
onEnterFrame = function()
{_root.output_instance.text = pass_word;
updateAfterEvent();
};
-----------------------------------
and I have a php:
------------------------------------
<?php
if ($input_pass_word == abc)
{ $true_or_false = "duck";
echo "$true_or_false"; // this line should send back to the swf the value
} // stored in $true_or_false as per the sendAndLoad
?>
-----------------------------------------
2 problems (or 100):
1) the swf does not respond to the php (ie _root.output_instance._xscale =160
never occurs)
2) echo "$true_or_false" is apparently not the correct way to send info back to the swf (ie _root.output_instance.text does not change from "nil" to "duck"
any ideas?
I apologize for the long post and appreciate if anyone read through all this
dsdsdsdsd
Asheville NC, where the snow should be soon
------------------------------------------
var pass_word = "nil";
p_w_m = new LoadVars(); // p_w_m = pass_word_mover
_root.button_instance.onPress=function()
{ p_w_m.input_pass_word = input_instance.text;
p_w_m.send("pass_word_checker.php","this" ;
};
p_w_m.onLoad = function(success)
{ _root.output_instance._xscale =160; //this is a test
pass_word = this.true_or_false;
};
onEnterFrame = function()
{_root.output_instance.text = pass_word;
updateAfterEvent();
};
-----------------------------------
and I have a php:
------------------------------------
<?php
if ($input_pass_word == abc)
{ $true_or_false = "duck";
echo "$true_or_false"; // this line should send back to the swf the value
} // stored in $true_or_false as per the sendAndLoad
?>
-----------------------------------------
2 problems (or 100):
1) the swf does not respond to the php (ie _root.output_instance._xscale =160
never occurs)
2) echo "$true_or_false" is apparently not the correct way to send info back to the swf (ie _root.output_instance.text does not change from "nil" to "duck"
any ideas?
I apologize for the long post and appreciate if anyone read through all this
dsdsdsdsd
Asheville NC, where the snow should be soon