# User Control of Input Text Size

**URL:** <https://forum.kirupa.com/t/user-control-of-input-text-size/186248>\
**Category:** flash\
**Created:** [April 20, 2006, 2:04am UTC](https://forum.kirupa.com/t/user-control-of-input-text-size/186248 "2006-04-20T02:04:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vpmiyu](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/vpmiyu/32/1977_2.png) [@vpmiyu](https://forum.kirupa.com/u/vpmiyu)\
**Post date:** [April 20, 2006, 2:04am UTC](https://forum.kirupa.com/t/user-control-of-input-text-size/186248/1 "2006-04-20T02:04:05Z")

</div>

Hey all,

I want to create a button on my root page that can change the size of the font a user is working with in an input text field. I’m not sure if it’s easier to have buttons designated for certain sizes or to increase size by a set amount, but here’s what I’ve tried so far using an online tutorial (didn’t work for me, but…)

```auto

on (release) {
	var myformat = new Textformat();
	myformat.size = 20;
	_root.page.textbox.setTextFormat(3, 6, myFormat);
}

```

(page is the name of the movieclip my textbox, cleverly named “textbox”, is in)

Any ideas why this might be wrong?(-:

---

<div class="post-metadata">

**Author:** ![freeskier89](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@freeskier89](https://forum.kirupa.com/u/freeskier89)\
**Post date:** [April 20, 2006, 3:12am UTC](https://forum.kirupa.com/t/user-control-of-input-text-size/186248/2 "2006-04-20T03:12:23Z")

</div>

That should work. If you are using Flash 8 you might want to change Textformat to TextFormat, because I think it is case sensitive, and the correct identifier is the latter. That set up is working for me in MX. If it still doesn’t work you might want to add trace(\_root.page.textbox) to your code so you can see if you are correctly identifying your textbox.

---

<div class="post-metadata">

**Author:** ![vpmiyu](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/vpmiyu/32/1977_2.png) [@vpmiyu](https://forum.kirupa.com/u/vpmiyu)\
**Post date:** [April 20, 2006, 4:06am UTC](https://forum.kirupa.com/t/user-control-of-input-text-size/186248/3 "2006-04-20T04:06:15Z")

</div>

> [@freeskier89](#):
>
> If it still doesn’t work you might want to add trace(\_root.page.textbox) to your code so you can see if you are correctly identifying your textbox.

I’ve never used trace before, so I’m not sure if I did it right (prolly not), but I have another button that clears the input text field, and that uses the same path \_root.page.textbox

My fla file (or a similar one) is at [http://www.pixelmiyu.com/fla](http://www.pixelmiyu.com/fla) (kitties2.fla) if you have time to look at it! I’m still a bit stumped…

---

<div class="post-metadata">

**Author:** ![freeskier89](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@freeskier89](https://forum.kirupa.com/u/freeskier89)\
**Post date:** [April 20, 2006, 4:21am UTC](https://forum.kirupa.com/t/user-control-of-input-text-size/186248/4 "2006-04-20T04:21:39Z")

</div>

> [@vpmiyu](#):
>
> I’ve never used trace before, so I’m not sure if I did it right (prolly not), but I have another button that clears the input text field, and that uses the same path \_root.page.textbox
> 
> My fla file (or a similar one) is at [http://www.pixelmiyu.com/fla](http://www.pixelmiyu.com/fla) (kitties2.fla) if you have time to look at it! I’m still a bit stumped…

Alright, here is the fixed FLA. It ended up that it was working, but you had it set so that only characters 3-6 were being resized in the textbox.

\>\>[Fixed FLA link](http://home.bresnan.net/~bcreavis/fixed.fla)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![vpmiyu](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/vpmiyu/32/1977_2.png) [@vpmiyu](https://forum.kirupa.com/u/vpmiyu)\
**Post date:** [April 20, 2006, 4:55am UTC](https://forum.kirupa.com/t/user-control-of-input-text-size/186248/5 "2006-04-20T04:55:26Z")

</div>

Thanks so much for your help! One more little problem…the link to the fla seems to be broken! Thanks again:}

---

<div class="post-metadata">

**Author:** ![freeskier89](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@freeskier89](https://forum.kirupa.com/u/freeskier89)\
**Post date:** [April 20, 2006, 5:13am UTC](https://forum.kirupa.com/t/user-control-of-input-text-size/186248/6 "2006-04-20T05:13:15Z")

</div>

Sorry about that :D. The link is fixed now 🙂

---

<div class="post-metadata">

**Author:** ![vpmiyu](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/vpmiyu/32/1977_2.png) [@vpmiyu](https://forum.kirupa.com/u/vpmiyu)\
**Post date:** [April 20, 2006, 5:19am UTC](https://forum.kirupa.com/t/user-control-of-input-text-size/186248/7 "2006-04-20T05:19:12Z")

</div>

GREAT! It works! Lovely…

I looked at the difference between the two files and all I could find was a single extra space between setTextFormat and (myformat)

Man, is actionscript always so picky?

THANK YOU! 👼

---

<div class="post-metadata">

**Author:** ![freeskier89](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@freeskier89](https://forum.kirupa.com/u/freeskier89)\
**Post date:** [April 20, 2006, 5:57am UTC](https://forum.kirupa.com/t/user-control-of-input-text-size/186248/8 "2006-04-20T05:57:20Z")

</div>

:lol:. Out of all languages, I guarentee you that flash is the least picky. There are a couple more differences in the AS than you mentioned, but not many 🙂
