Question : Displaying next record in actionscript

I have built a flash program using the one on this web site
http://www.15seconds.com/Issue/010605.htm as a base and I am not very knowledge on action scripting to make it do what I am looking to do. Right now to navigate there is a forward  buttons which will bring up the next record up, but I would like it to after a set time display the next record by itself. I tried the code shown here which is the best i been able to come up with. I am not sure if I am on the right track on not, any help would be appreciated.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
function myfunction() {
	clearInterval(myInterval);
	CurrentRecord++;
	if (CurrentRecord == TotalRecords) {
		CurrentRecord = 0;
	}
	loadVariables("getdetails.asp?Record="+(CurrentRecord), this);
}
 
myInterval = setInterval(myfunction, 6000);
Open in New Window Select All

Answer : Displaying next record in actionscript

try it this way and let me know how it works

GE
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
function myfunction() {
 
        clearInterval(myInterval);
        CurrentRecord++;
        if (CurrentRecord == TotalRecords) {
                CurrentRecord = 0;
        }
        loadVariables("getdetails.asp?Record="+(CurrentRecord), this);
}
 
var myInterval:Number = setInterval(myfunction, 6000);
Open in New Window Select All
Random Solutions  
 
programming4us programming4us