Hooray!!!
I have managed to get somewhere! So far it only displays the title and excerpt but the rest should be straightforward from now on.
Here is the code in frame 1 of my swf:
stop();
addressVars = new LoadVars();
addressVars.load("https://localhost/testing/posts.php");
addressVars.onLoad = function(success) {
gotoAndStop(10);
}
In frame 10:
stop();
_root.theTitle0 = addressVars.title0;
_root.theExcerpt0 = addressVars.excerpt0;
(theTitle0 and theExcerpt0 are variable names of my two dynamic text boxes)
And finally, the code in posts.php:
<?php
mysql_pconnect ("localhost", "myusername", "mypassword");
mysql_select_db ("wordpress");
$qResult = mysql_query ("SELECT * FROM wp_posts ORDER BY
post_date DESC");
$nRows = mysql_num_rows($qResult);
$rString ="".$nRows;
for ($i=0; $i< $nRows; $i++){
$row = mysql_fetch_array($qResult);
$datetime = strtotime($row['post_date']);
$rString .="&title".$i."=".$row['post_title'].
"&"."theTime".$i."=".date(jS." ".F." ".Y.", ".h.":".i."
".a,$datetime).
"&"."link".$i."=".$row['guid'].
"&"."comments".$i."=".$row['comment_count'].
"&"."excerpt".$i."=".$row['post_excerpt'].
"";
}
echo $rString."&";
?>
(That has more code than is necessary as I have not set up Flash to receive anything other than the title and excerpt yet.)
As I said, this is just a start but I hope it was the hardest part! I will keep this topic marked as unresolved until I have completed what I am trying to do so if anyone has any suggestions I will be very grateful.
Thanks!