5 Replies Latest reply on Oct 29, 2008 8:52 AM by kglad

    Automatically incrementing records from a database every 10 seconds

    ctf_gloc
      I have been trying to get some database records from an access database to increment every few seconds or so but have been so far unsuccessful. I am not fantastic at action script but i belive the soloution should be reletivly simple for someone who knows what they are doing.

      I am using a template i found on the internet and it is based on an ASP page linked to the database which displays its variables in flash.

      The current action script to change records is by usinging a button with an onclick event:

      Does anyone out there know what i will need to do in order to modify it so that it uses a timer to increment the record.


      onClipEvent(data)
      {
      strName = Name;
      strTelephone = Telephone;
      strCity = City;
      strNotes = Notes;
      strPosition = "Record " add String(CurrentRecord+1) add " of " add String(TotalRecords);
      }

      onClipEvent(load)
      {
      CurrentRecord = 0;
      loadVariables ("getdetails.asp?Record=0", this);

      }


      The button that increments has this script attached:

      {
      CurrentRecord++;
      if (CurrentRecord == TotalRecords)
      CurrentRecord = 0;

      loadVariables ("getdetails.asp?Record=" add String(CurrentRecord), this);
      }



      I just need to get this script to automatically activate every 1000 miliseconds automatically

      Thanks in advance!!

      Adam