# Counting symbols

**URL:** <https://forum.kirupa.com/t/counting-symbols/186684>\
**Category:** Uncategorized\
**Created:** [April 23, 2006, 5:52pm UTC](https://forum.kirupa.com/t/counting-symbols/186684 "2006-04-23T17:52:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yahoo4fun](https://avatars.discourse-cdn.com/v4/letter/y/b4bc9f/32.png) [@Yahoo4fun](https://forum.kirupa.com/u/Yahoo4fun)\
**Post date:** [April 23, 2006, 5:52pm UTC](https://forum.kirupa.com/t/counting-symbols/186684/1 "2006-04-23T17:52:49Z")

</div>

can you give me a hint… i have input text for some users comments, and there is a limit of symbols (100)… i want to count how much symbols left to write and write number in dynamic text box

---

<div class="post-metadata">

**Author:** ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)\
**Post date:** [April 26, 2006, 2:47am UTC](https://forum.kirupa.com/t/counting-symbols/186684/2 "2006-04-26T02:47:04Z")

</div>

Something like this? =)

---

<div class="post-metadata">

**Author:** ![claudio](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@claudio](https://forum.kirupa.com/u/claudio)\
**Post date:** [April 26, 2006, 3:12am UTC](https://forum.kirupa.com/t/counting-symbols/186684/3 "2006-04-26T03:12:48Z")

</div>

I guess he meant something like this

```auto
var max_chars = 100;
createTextField("inputField", 1, 0, 0, 200, 20);
createTextField("counterField", 2, 210, 0, 50, 20);
inputField.type = "input";
inputField.border = counterField.border=true;
inputField.maxChars = 100;
inputField.onChanged = updateField;
function updateField() {
	counterField.text = max_chars-inputField.text.length;
}
updateField();

```

---

<div class="post-metadata">

**Author:** ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)\
**Post date:** [April 26, 2006, 3:56am UTC](https://forum.kirupa.com/t/counting-symbols/186684/4 "2006-04-26T03:56:05Z")

</div>

> [@claudio](#):
>
> I guess he meant something like this ActionScript Code:  
> [FONT=Courier New][LEFT][COLOR=#000000] **var** [/COLOR] max\_chars = [COLOR=#000080]100[/COLOR];  
> [COLOR=#0000ff]createTextField[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“inputField”[/COLOR], [COLOR=#000080]1[/COLOR], [COLOR=#000080]0[/COLOR], [COLOR=#000080]0[/COLOR], [COLOR=#000080]200[/COLOR], [COLOR=#000080]20[/COLOR][COLOR=#000000])[/COLOR];  
> [COLOR=#0000ff]createTextField[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“counterField”[/COLOR], [COLOR=#000080]2[/COLOR], [COLOR=#000080]210[/COLOR], [COLOR=#000080]0[/COLOR], [COLOR=#000080]50[/COLOR], [COLOR=#000080]20[/COLOR][COLOR=#000000])[/COLOR];  
> inputField.[COLOR=#0000ff]type[/COLOR] = [COLOR=#ff0000]“input”[/COLOR];  
> inputField.[COLOR=#0000ff]border[/COLOR] = counterField.[COLOR=#0000ff]border[/COLOR]=[COLOR=#000000] **true** [/COLOR];  
> inputField.[COLOR=#0000ff]maxChars[/COLOR] = [COLOR=#000080]100[/COLOR];  
> inputField.[COLOR=#0000ff]onChanged[/COLOR] = updateField;  
> [COLOR=#000000] **function** [/COLOR] updateFieldCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
> &nbsp;&nbsp;&nbsp;&nbsp;counterField.[COLOR=#0000ff]text[/COLOR] = max\_chars-inputField.[COLOR=#0000ff]text[/COLOR].[COLOR=#0000ff]length[/COLOR];  
> [COLOR=#000000]}[/COLOR]  
> updateFieldCOLOR=#000000[/COLOR];  
> [/LEFT]  
> [/FONT]

ahhh, my bad. I missed the input field part. All I saw was symbols :cantlook:

---

<div class="post-metadata">

**Author:** ![vini](https://avatars.discourse-cdn.com/v4/letter/v/c77e96/32.png) [@vini](https://forum.kirupa.com/u/vini)\
**Post date:** [May 1, 2006, 7:52am UTC](https://forum.kirupa.com/t/counting-symbols/186684/5 "2006-05-01T07:52:09Z")

</div>

Applause
