This article demonstrates how to create a classic guest book made with Flash
and either ASP or PHP (the source code for both of these are included). The data
is saved and retrieved through PHP/ASP and displayed in Flash movie in HTML format.
Creating the Flash Movie
Start a new flash movie. Insert a new Dynamic text box and give it name txtmain
and don't forget to check the HTML option. Insert a dynamic text fields status
which will be used for displaying messages. Insert a new layer, name it action
and place following code in action window.
lowlimit = 0;
highlimit = 10;
loadVariablesNum ("guestbook.php?lowlimit="+lowlimit+"&highlimit="+highlimit,
0);
stop();
lowlimit and highlimit are the flash variables that would be send to PHP script. First time data range from record 1 to record 10 will be displayed in HTML enabled text box.
Insert two new button instances for up and down scrolling
For Up Button
on (release) {
txtmain.scroll--;
}
For Down Button
on (release) {
txtmain.scroll++;
}
Above code is self-explanatory.
I am not giving details for SCROLLING the movie. I will add a new tutorial in
the flash section.
Comments