# Passing properties to constructor?

**URL:** <https://forum.kirupa.com/t/passing-properties-to-constructor/307435>\
**Category:** Uncategorized\
**Created:** [April 3, 2010, 8:28am UTC](https://forum.kirupa.com/t/passing-properties-to-constructor/307435 "2010-04-03T08:28:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HBK](https://avatars.discourse-cdn.com/v4/letter/h/48db29/32.png) [@HBK](https://forum.kirupa.com/u/HBK)\
**Post date:** [April 3, 2010, 8:28am UTC](https://forum.kirupa.com/t/passing-properties-to-constructor/307435/1 "2010-04-03T08:28:50Z")

</div>

Beginner question here…

Is it possible to define ‘public properties’ of an object in the constructor method when you create the object ? similar to…

var leftmain\_scrollertext = new TextField({length:10});

I have a TextField and I want to set its maxChars, x, y, width etc.

when I specify one or more of these I get…  
1137: Incorrect number of arguments. Expected no more than 0.

am I forced to specify each property I want individually after I have constructed it ?

Thanks
