Textarea Counting and Limiting

Published :
Author :
Adam Khoury
Learn to use Flash ActionScript 3.0 to limit and count a text field in your Flash based forms. Show the user how many characters are remaining that they can type into that field. It will visually limit the amount they can type in real time also. var taMax:int = 250; var maxDiff:int = 0; countDisplay_txt.text = "250 character remaining"; ta.addEventListener(Event.CHANGE, taChangeEvent); function taChangeEvent(e:Event):void { maxDiff = taMax - ta.length; countDisplay_txt.text = maxDiff+" character remaining"; }