Flash Actionscript Q

Out of context: Reply #5

  • Started
  • Last post
  • 8 Responses
  • Mick0

    See if this works...
    stop();
    function typewriter(chars) {
    this.onEnterFrame = writeText;
    this.count = 1;
    this.i = 1;
    this.message = chars;
    this.maxLength = this.message.length;
    }

    function writeText(){
    this.typewriter_txt.text = this.message.substr(0,this.count...
    count++;
    if(count>this.maxLength){
    var isEven = count/2;
    if(isEven == Math.floor(isEven)){
    typewriter_txt.text +="_";
    }
    }
    if(count>this.maxLength+6) {
    gotoAndStop(2);
    }
    }
    typewriter("hello everybody! \nHow are you?");

View thread