Hi,
I’m loading into flash, variables with php ,that were previously stored on a mysql database. Everything is running OK except for the number of the present entry when someone browses through all entries. It always shows the total entries number and not the number of the entry that is being showed.
To explain better with the image the number on the right show the total entries. When we click the left arrow button the number on the left should be 5,4,and so on… The problem is it stays in the same number, in this case the number 6.
I think that the problem is with the action script in the buttons, but I went through it several times and don’t find any errors.
Here is the code for the left button:
on (release) {
_root.myN++;
if (_root.myN > _root.Records_txt.text) {
_root.myN = 0;
}
_root.Name_txt.variable = "arr_Name" add myN;
_root.Date_txt.variable = "arr_Date" add myN;
_root.From_txt.variable = "arr_City" add myN;
_root.Email_txt.variable = "arr_Email" add myN;
_root.URL_txt.variable = "arr_URL" add myN;
_root.Comment_txt.variable = "arr_Comment" add myN;
_root.Continent_txt.variable = "arr_Continent" add myN;
_root.x_txt.variable = "arr_fldX" add myN;
_root.y_txt.variable = "arr_fldY" add myN;
_root.xScroll_txt.variable = "arr_fldScrollX" add myN;
_root.yScroll_txt.variable = "arr_fldScrollY" add myN;
_root.civ_txt.variable = "arr_Civ" add myN;
//
_root.presentRec_txt.text = Number(_root.presentRec_txt.text) - 1;
if (Number(_root.presentRec_txt.text) < 1) {
_root.presentRec_txt.text = Number(_root.recCount_txt.text);
}
loadData();
checkMap();
}
Can some of you tell me what’s wrong or teach me a better way of coding?
Tank you all,
Regards
Filipename