all groups > flash data integration > july 2006 >
You're in the

flash data integration

group:

PHP and Flash parsing problem


PHP and Flash parsing problem Fermiona
7/14/2006 12:00:00 AM
flash data integration:
I have a flash application which contains a "dynamic text" with a var name
"myVar" and an instance name "dt_txt"
I have a button to which I attached the code:
____________________________________
on (release) {
var lv = new LoadVars();
lv.load ("http://localhost/test.php");
lv.onLoad = function( ){
_root.dt_txt.text = lv ;
trace("variables loaded");
}
}
____________________________________

The "test.php" file contains the simple code:
____________________________________
<?php
$x = "abc";
print "myVar=$x";
?>
____________________________________

When I run the flash application (expecting "abc" to show up), I get the
following :
myVar=abc&onLoad=%5Btype%20Function%5D

What is wrong?
Re: PHP and Flash parsing problem Raymond Basque
7/14/2006 12:31:36 PM
You are assigning the LoadVars instance (lv.toString()) to the text field
instead of myVar.

Try this:

var lv = new LoadVars();
lv.onLoad = function( success){
_root.dt_txt.text = this["myVar"] ;
}
lv.load ("http://localhost/test.php");


[quoted text, click to view]

Re: PHP and Flash parsing problem Vertine
7/14/2006 3:25:55 PM
hi Fermiona- welcome...could it be that your dynamic text field is ready for html...try

AddThis Social Bookmark Button