escteban
10-19-2005, 05:05 AM
Hi there ,
I am a really poor beginner in flash but I love it . My problem may be simple but it's hard enough to have made waist 2 hours then please may day
I am bringing data from a MySQL database in my php files (lyricsTest.php) like this :
php script ----------------------------------
$rows = mysql_num_rows($result);
echo "&nbEntrees=$rows&";
for ($j = 0; $j < $rows; $j++) {
$listepourcombo = "'&comboDonnee";
$listepourcombo .= $j ;
$listepourcombo .= "=" ;
$listepourcombo .= mysql_result($result, $j, 3) ;
$listepourcombo .= "&'";
echo $listepourcombo ;
}
--------------------------------------------
and I want to send the var comboDonnee + j to flash in order to add items in a combo box . In flash , I get the following script
AS------------------------------------------
Sortie = new LoadVars();
Entree = new LoadVars();
valid_btn.onRelease = function(){
// I send variables too but that s not the point here that s why I took it away
Sortie.sendAndLoad("lyricsTest.php", Entree, "POST");
Entree.onLoad = function(success) {
if (success) {
reponse.text = this.comboDonnee2;
//that works then the problem is not coming from the php loop
for (i=0; i<= this.nbEntrees; i++) {
combo1.addItemAt(i, this.comboDonnee+i);
}
}
};
};
--------------------------------------------
But that doesn t work I ve tried :
combo1.addItemAt(i, eval(String(comboDonnee+i)));
and many others combinaisons but no 1 works , then please help me , I am not a coder and I ve having hard time with that.
Thanks by advance
I am a really poor beginner in flash but I love it . My problem may be simple but it's hard enough to have made waist 2 hours then please may day
I am bringing data from a MySQL database in my php files (lyricsTest.php) like this :
php script ----------------------------------
$rows = mysql_num_rows($result);
echo "&nbEntrees=$rows&";
for ($j = 0; $j < $rows; $j++) {
$listepourcombo = "'&comboDonnee";
$listepourcombo .= $j ;
$listepourcombo .= "=" ;
$listepourcombo .= mysql_result($result, $j, 3) ;
$listepourcombo .= "&'";
echo $listepourcombo ;
}
--------------------------------------------
and I want to send the var comboDonnee + j to flash in order to add items in a combo box . In flash , I get the following script
AS------------------------------------------
Sortie = new LoadVars();
Entree = new LoadVars();
valid_btn.onRelease = function(){
// I send variables too but that s not the point here that s why I took it away
Sortie.sendAndLoad("lyricsTest.php", Entree, "POST");
Entree.onLoad = function(success) {
if (success) {
reponse.text = this.comboDonnee2;
//that works then the problem is not coming from the php loop
for (i=0; i<= this.nbEntrees; i++) {
combo1.addItemAt(i, this.comboDonnee+i);
}
}
};
};
--------------------------------------------
But that doesn t work I ve tried :
combo1.addItemAt(i, eval(String(comboDonnee+i)));
and many others combinaisons but no 1 works , then please help me , I am not a coder and I ve having hard time with that.
Thanks by advance