flash-typewriter effect

Out of context: Reply #4

  • Started
  • Last post
  • 12 Responses
  • Jerry0

    stop ();
    function doVidiprinterEffect (textfield, strtext, speed) {
    if (strtext == undefined) {
    strtext = textfield.htmlText;
    textfield.htmlText = "";
    }
    //
    var string_index = 0;
    var max_index = strtext.length;
    //
    var printToField = function (){
    textfield.text += strtext.charAt (string_index);
    string_index++;
    if (string_index == max_index) {
    clearInterval (sID);
    }

    }
    sID = setInterval (printToField, speed)
    }
    doVidiprinterEffect (this.display_txt, "sdadjas;djkfas'dfjkal;ksjdfasjd... 15);
    //

View thread