Ok, I have been searching for days with no luck.
What Im trying to do in flash mx is to connect to mysql database using php and display the results in the flash swf movie.
I have found numourous tutorials on this subject, however i cant get a single one to work.
A little info about what i have so far and the problems im getting:
note: the php file has the swf embeded in it, not a seperate file.
Textbox.swf ----------------
a single textbox with a varible called text. see above screenshot.
textbox.php-----------------
PHP Code:
<?php
// change this to your database details
$connect = @mysql_connect("xxxxxx", "xxxxx", "xxxxx") or die("cannot connect");
// Change the database name
mysql_select_db("smarty2");
// change varaible to your database
$sql = "SELECT * FROM pirep";
$result = mysql_query($sql) or die("Query failed");
$row = mysql_fetch_array($result);
$text = $row['pilotid'];
mysql_free_result($result);
mysql_close( $connect );
?>
<p><!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--<P ALIGN="LEFT"></P>-->
<object id="Untitled-1" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="400" width="550" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="_cx" value="14552">
<param name="_cy" value="10583">
<param name="FlashVars" value>
<param name="Movie" value="http://www.psavirtual.com/textbox.swf">
<param name="Src" value="http://www.psavirtual.com/textbox.swf">
<param name="WMode" value="Window">
<param name="Play" value="0">
<param name="Loop" value="-1">
<param name="Quality" value="High">
<param name="SAlign" value>
<param name="Menu" value="-1">
<param name="Base" value>
<param name="AllowScriptAccess" value="always">
<param name="Scale" value="ShowAll">
<param name="DeviceFont" value="0">
<param name="EmbedMovie" value="0">
<param name="BGColor" value="FFFFFF">
<param name="SWRemote" value>
<param name="MovieData" value><embed src="textbox.swf?text=? echo $text ?>" " quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400">
</object>
</p>
the out put i get is shown in the photo below.
Note: one thing i found. If i have the instance name as text, i get the results as seen in the photo above, but when i only have the variable named text and no instance name, i have a blank swf.
I realize i am not the most knowledgeable programmer, i put this together copy and pasting from tutorials, I really would like help with this if anyone can help me with tutorials or can tell me what i am doing wrong, i sure would appreciate the help.
Thank you
Michael