Hi,
I have trouble with displaying image and text in flash from php/mysql.
The images are stored in a folder and the path is in the database. In flash I use htmltext.
I want the flashpage to display images and the descriptions after each other, vertical.
I need to have like 10 images and the description for each image.
Now it works if I only use text. The images are display on each other, overlapping.
Someone?
This is my php:
$objConn = mysql_connect ('*' , '*' , '*');
mysql_select_db ('*');
$query = "SELECT * FROM aboutus ORDER BY id DESC";
$result = mysql_query($query) or die ("error");
$blogCount = mysql_num_rows($result);
for ($count = 0; $count < $blogCount; $count++){
$blog = mysql_fetch_array($result);
$id = $blog['id'];
$person = $blog['person'];
$kbesk = $blog['kbesk'];
$besk = $blog['besk'];
$images = $blog['images'];
$output .= "&blog" . $count . "id=" . $id;
$output .= "&blog" . $count . "person=" . $person;
$output .= "&blog" . $count . "kbesk=" . $kbesk;
$output .= "&blog" . $count . "besk=" . $besk;
$output .= "&blog" . $count . "images=" . $images;
}
$output .="&blogCount=".$blogCount;
echo $output;
mysql_close($objConn);
And this is the actionscript:
System.useCodepage = true;
desc_txt.html = true;
send_lv = new LoadVars();
result_lv = new LoadVars();
send_lv.sendAndLoad("http://www.mypage/omoss.php", result_lv, "POST");
result_lv.onLoad = function(success) {
desc_txt.html = true;
if (success) {
for (i = 0; i < result_lv.blogCount; i++) {
desc_txt.htmlText +="<b>"+result_lv['blog'+i+'person']+"</b><br><br>";
desc_txt.htmlText +="<img src='"+result_lv['blog'+i+'images']+"'><br><br>";
desc_txt.htmlText +="<i>"+result_lv['blog'+i+'kbesk']+"</i><br><br><br>";
desc_txt.htmlText +=result_lv['blog'+i+'besk']+"<br><br><br>";
}
} else {
trace("error==" + unescape(result_lv));
}
};