# How to pass an object of parameters to textfield instance?

**URL:** <https://forum.kirupa.com/t/how-to-pass-an-object-of-parameters-to-textfield-instance/305649>\
**Category:** flash\
**Created:** [March 1, 2010, 11:22am UTC](https://forum.kirupa.com/t/how-to-pass-an-object-of-parameters-to-textfield-instance/305649 "2010-03-01T11:22:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eb\_dev](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@eb\_dev](https://forum.kirupa.com/u/eb_dev)\
**Post date:** [March 1, 2010, 11:22am UTC](https://forum.kirupa.com/t/how-to-pass-an-object-of-parameters-to-textfield-instance/305649/1 "2010-03-01T11:22:10Z")

</div>

What I’m trying to do is create a simple message class that I can pass a set of textfield parameters of my choosing rather than specifying each textfield parameter in the constructor.

Is it possible to pass a textfield instance an object of parameters instead of setting each one individually?

Ideal world example:

```auto

public class Example {

  private var message:String;
  private var messageTextField:TextField;

  public function Example(message:String,settings:Object)
  {
    messageTextField = new TextField();
    messageTextField.text = message;
    messageTextField.settings = settings;
  } 
}

```

Thanks,

eb\_dev
