Re: Dynamic combobox in Flash with PHP
| From: | Michiel van Heusden | Date: | Sun, 23 Feb 2003 18:09:58 +0000 |
| Subject: | Re: Dynamic combobox in Flash with PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136742@lists.php.net to get a copy of this message | ||
my experience is
that interaction between flash and php runs best through GET
so, you could try using GET instead of POST
and in your actionscript
insert the ';' on the end of the lines for:
test = this["list_label"+i]
myItem.label = test
grace
michiel
"Pei_world" <pei_world@hotmail.com> wrote in message
news:20030223123203.99765.qmail@pb1.pair.com...
> I have the following PHP code to generate output to the flash
> //=======================================================================
> $query = "SELECT currencyCode,currencyName,country,buyPrice,sellPrice
> FROM $CURRENCIES_TABLE order by currencyCode;";
>
> $db_linker = db_connection();
> db_selection($db_linker);
> $result = mysql_query($query);
> $num=mysql_num_rows($result);
> echo "&array_num=".$num;
> for($i=0; $i<mysql_num_rows($result); $i++){
> echo
>
"&list_label".$i."=".mysql_result($result,$i,"currencyCode").",".mysql_resul
> t($result,$i,"currencyName");
> }
>
>
> db_close($db_linker);
>
>
>
//==========================================================================
> ==
>
>
> also the following code in actionscript use to receive&send data.
> but when I run the *.swf it cann't get the output from PHP,
> so anyone can help????
>
> //============================================================
> loadVariables("link.php", this, "POST"); // get the data from php file
> /*
> //==================================================
> iList = new Array();
> myItem = new Object();
> iList[0] = myItem;
>
> for (i=0; i<array_num; i++) {
> myItem = new Object();
> test = this["list_label"+i]
> myItem.label = test
> myItem.data = i;
> iList[i+1] = myItem;
> }
>
> list_currency.setDataProvider(iList);
>
> //========================================================================
>
>
>
>
> thx.
>
> --
> Sincerely your;
>
> pei_world ( .::IT::. )
>
>
>
>
>