I try to upload flash into my website and communicate flash with php codes using action script. The code goes like tis.
This is the action script :
var getDuck:LoadVars = new LoadVars();
var getDuckDuck:LoadVars = new LoadVars();
getDuck.load("http://carrotjuice.freehostia.com/duckduck.php");
getDuck.onLoad = function() {
theDuckDuck_txt.text = this.theDuckDuck;
};
This is the php file:
<?php
mysql_select_db($ourdatabase, $name);
$query_Recordset1 = "SELECT heading, news FROM announcements";
$Recordset1 = mysql_query($query_Recordset1, $name) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$DuckDuck = $row_Recordset1['heading']."\n\n".$row_Recordset1['news'];
echo 'theDuckDuck='.urlencode("$DuckDuck")."\n";
mysql_free_result($Recordset1);
?>
It is use to display our newest annoucement store in the database in flash. The flash can work perfectly in our localhost.
Without this function our flash can work perfectly in the server, but when we add this function the flash cannot be displayed in the web.
Is it freehostia does not support tis function. or some other parts is wrong. pls help ty!
|