I need help passing different variables to Flash.
I can list everything from the database, with each item having it’s own id number
example:
<?
$server = "localhost";
$user = "";
$pass = "";
$db = "";
$conn = mysql_connect($server,$user,$pass);
$db = mysql_select_db($db);
$sql="SELECT * FROM members ORDER BY name_l";
$result=mysql_query($sql,$conn);
while ($row = mysql_fetch_array($result)) {
$member_id = $row["member_id"];
$name_l = $row["name_l"];
$name_f = $row["name_f"];
echo ("<font face=verdana size=2><A HREF=\"profile.php?id=$member_id\"> $name_l, $name_f</font></A>");
echo "<br><br>";
}
?>
Where member_id is, it changes (obviously), but when I click on a link, it automatically takes me to the first name listed in Flash.
I need flash to know to pull the information corresponding with the proper id number.
You can see what i mean here http://cheezyfries.net/test/test.php
The Flash file pulls the information from here
<?
$server = "localhost";
$user = "";
$pass = "";
$db = "";
$conn = mysql_connect($server,$user,$pass);
$db = mysql_select_db($db);
$sql="SELECT * FROM amember_members";
$result=mysql_query($sql,$conn);
$row = mysql_fetch_array($result);
$member_id = $row["member_id"];
$name_l = $row["name_l"];
$name_f = $row["name_f"];
echo "&name_f=$name_f&name_l=$name_l&member_id=$member_id"
?>
This is the only Action Script I am using in Flash
loadVariables("test1.php","")
Maybe that’s wrong to be able to parse the variable to the flash document the way that I need it to.
Would that be right?
Here is the file that contains the .swf
<?
$server = "localhost";
$user = "";
$pass = "";
$db = "";
$conn = mysql_connect($server,$user,$pass);
$db = mysql_select_db($db);
$sql="SELECT * FROM amember_members WHERE member_id=$id";
$result=mysql_query($sql,$conn);
$row = mysql_fetch_array($result);
$member_id = $row["member_id"];
echo "$member_id";
?> <br>
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--SEQUENCE LOADING--><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0)"
WIDTH="800" HEIGHT="600" id="test" ALIGN="">
<PARAM NAME=movie VALUE="test.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="=test.swf?id=<? echo $member_id?>" quality=high bgcolor=#000000 WIDTH="800" HEIGHT="600" NAME="test" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="<A href="http://www.macromedia.com/go/getflashplayer"></EMBED">http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
Can anybody help me?
Sorry, I’m using FlashMX