# A better way?

**URL:** <https://forum.kirupa.com/t/a-better-way/151701>\
**Category:** flash\
**Created:** [June 17, 2005, 12:43pm UTC](https://forum.kirupa.com/t/a-better-way/151701 "2005-06-17T12:43:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bennymartensson](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bennymartensson/32/1317_2.png) [@bennymartensson](https://forum.kirupa.com/u/bennymartensson)\
**Post date:** [June 17, 2005, 12:43pm UTC](https://forum.kirupa.com/t/a-better-way/151701/1 "2005-06-17T12:43:53Z")

</div>

Is there a better way of writing this piece of code? Thinking that it would be a lot of work if i have 20 textfields?

myTextField.autoSize = myTextField2.autoSize = myTextField3.autoSize = “left”;  
myTextField.background = myTextField2.background = myTextField3.background = true;  
myTextField.backgroundColor = myTextField2.backgroundColor = myTextField3.backgroundColor = 0x000000;  
myTextField.textColor = myTextField2.textColor = myTextField3.textColor = 0xFFFFFF;  
myTextField.selectable = myTextField2.selectable = myTextField3.selectable = false;
