Flash mx guestbook

any sugestions on how to display my entrys in flash using asp and access database? I want to show them all at the same page so some kind of loop would be nice :wink:

do I have to use arrays:q:

very thankfull for help from you smart guys:)

well to load your asp data
http://www.asp101.com/articles/flash/index.asp

that will help. you dont need to use an array, you can use a loop.

iā€™ve never called asp into flash as i never needed to, php is much better. to send data from flash to asp is simple, itā€™s the same way you would do it in html. if you need help repost and i will try to help as much as i can

Oki. IĀ“ll give PHP a try but right now IĀ“m putting all my energy in to learning ActionScript :slight_smile:
Is PHP hard to learn if you know ASP and JavaScript? What makes PHP better?

Looked through the page you sent me and it was great! thanks a lot! But when IĀ“m creating a guestbook I would like to show all enties at once? I need to loop in actionscript what the asp-pageĀ“s responding to a ā€œSELECT * FROM tblGuestbookā€ if you know what I mean?

I have an idea I would like to run whit you if thats ok?
I create an array in asp with the top 25 of the entries in the database and then I send this array to Flash and loop through it there? Or will this take to long?

Thank you very much for your help!

your going to be better off doing it through PHP. itā€™s not that hard, setting up mySQL was a bit of a problem for me, thankfuly Iā€™ve had help from fellow kirupians. Let me shwo you the code that I use for my news section. It loops all the events in my table.


  @ $db = mysql_pconnect("localhost", "un", "pw");

  if (!$db){
    echo "Error: Could notconnect to database.";
    exit;
    }

  mysql_select_db("database", $db);
  $query = "select * from news";

  $result = mysql_query($query);


  $num_results = mysql_num_rows($result);

 

$title = ""; 
for ($i=0; $i <$num_results; $i++){  
$row = mysql_fetch_assoc($result); 
$title .= $row['date'] . "
". $row['description'] . "
";
}

print "title=".$title;  //print it out so Flash can read it.

Now you have an idea how it works using PHP. AS far as what is better, mySQl databases are faster and can work with a lot mroe informatin that MSAccess.

Thats great. I have a PHP script similar to this.

But I am curious, I have multiple rows in my NEWS table and want to pass the value of each row ā€˜$titleā€™ to a duplicated MC in Flash.

So if I have a MC called ā€˜contentā€™ and want to duplicate that MC and pass the value of ā€˜$titleā€™ each timeā€¦is there a special way of doing this??

Cheers