22 Views and no answer. I am sure this is something that someone here knows about. Thanks.
I went online and looked for some tutorials about this subject and found one but it does not seem to work for some reason.
Here is the CODE:
PHP:
<?php
$fName = "nuno";
$lastName = "mira";
$age = '24';
// echo or print the variables
echo ("&fName=$fName&lastName=$lastName&age=$age&");
?>
ACTIONSCRIPT:
// here is a reference to this timeline
var here = this
// create an object to store the variables
varReceiver = new LoadVars();
// load a file
// now the target path is to the server, because it's a php file
varReceiver.load("external.php");
// when the variables finish loading
//trigger something
varReceiver.onLoad = function() {
// show some text in a text field
// using the loaded variables
here.createTextField("t_txt", 1, 100, 100, 1, 1);
here.t_txt.autoSize = true;
here.t_txt.text = "My first name is " + this.fName + ".
";
here.t_txt.text += "My last name is " + this.lastName + ".
";
here.t_txt.text += "I'm " + this.age + " years old.";
};
RESULT OF ACTIONSCRIPT:
My first name is $fName.
My last name is $lastName.
I’m $age years old.
So instead of entering the values for the variables it just puts in the variable name. Can anyone tell me why?
Thanks