2 Replies Latest reply on Apr 19, 2007 1:33 PM by Newsgroup_User

    Double Integer

    midnight_cg
      I am creating a digital timer and using the below code in a frame script, however when the seconds of the clock go below 10 it is shown in the field as 9 instead of 09! Does anyone know a solution to this - i.e. by setting the text of the field to a double integer?
      global gvGameTimeSeconds, gvGameTimeMinutes
      on enterFrame
      gvGameTimeMinutes = 5
      gvGameTimeSeconds = ("00")
      on exitFrame me
      gvGameTimeMinutes = 4
      gvGameTimeSeconds = 59-(the timer/59)
      put gvGameTimeSeconds into field "seconds"
      if 59-(the timer/59) > 0 then
      go to the frame
      else
      go to the frame+1
      end if
      if gvGameTimeSeconds = 00 then
      gvGameTimeMinutes = gvGameTimeMinutes -1
      put gvGameTimeMinutes into field "minutes"
      end if
      end

      Many Thanks,
      Midnight.