Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

flash/actionscript load

Status
Not open for further replies.

999000333

Programmer
Nov 20, 2006
39
Hello I have a problem: I have a database(mysql) with the following fields:
test, descr, title
I want to display them into a flash file.
Now my php file called list.php (which collect the information from my database) is the following:

<?php
include_once '../library/config.php';
include_once '../library/opendb.php';
$query =mysql_query("SELECT * FROM `$table` ORDER BY(`title`DESC ");

$cant=0 ;
while($row=mysql_fetch_array($query)){
echo "$cant=$row[title]&$cant=$row[descr]&$cant=$row[test]";
$cant++;
}
echo "cant=$cant";
?>

My flash file has 3 input dynamic text (to display the database)called titletx, descrtx, testx.
and I put an actionscript code to call the php file into my flash file here it is:

myData = new LoadVars()

myData.load("myData.onLoad = function(succes){
if(succes){
for(var i=0; i<this.cant; i++){
titletx.text = this.title
descrtx.text = this.descr
testx.text = this.test
}
}
else
trace("Error loading data")
}

everything is in one fotogramma: the input dynamic text and the actionscript code.

Can anyone be so kind to tell me why this code do not work? or have any suggestion?
Thanks
Pa.
 
beer can be a terrible thing
Code:
myData.sendAndLoad("[URL unfurl="true"]www.ilgerss.it/mazzi/list.php",myData,"POST");[/URL]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top