# Class to assign object properties

**URL:** <https://forum.kirupa.com/t/class-to-assign-object-properties/312181>\
**Category:** flash\
**Created:** [July 27, 2010, 4:11pm UTC](https://forum.kirupa.com/t/class-to-assign-object-properties/312181 "2010-07-27T16:11:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpann](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tpann](https://forum.kirupa.com/u/tpann)\
**Post date:** [July 27, 2010, 4:11pm UTC](https://forum.kirupa.com/t/class-to-assign-object-properties/312181/1 "2010-07-27T16:11:47Z")

</div>

I have created an object called myObj.

How do I create a class that I can call that will assign properties to myObj such that

```php
myObj = {foo:15, bar:"hello"}

```

…?

BTW, I do not want to just say

```php
var myObj:Object = {foo:15, bar:"hello"}

```

…because in fact I am going to be creating a bunch of objects all having the same properties, and there will be many more such objects.
