# Adding properties to a class

**URL:** <https://forum.kirupa.com/t/adding-properties-to-a-class/194255>\
**Category:** Uncategorized\
**Created:** [July 21, 2006, 6:00pm UTC](https://forum.kirupa.com/t/adding-properties-to-a-class/194255 "2006-07-21T18:00:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![voxecho](https://avatars.discourse-cdn.com/v4/letter/v/278dde/32.png) [@voxecho](https://forum.kirupa.com/u/voxecho)\
**Post date:** [July 21, 2006, 6:00pm UTC](https://forum.kirupa.com/t/adding-properties-to-a-class/194255/1 "2006-07-21T18:00:43Z")

</div>

hiya… i am attempting to add “unknown” properties/variables to the MX Class:XMLConnector. I need this so that i can pass more information to the object that will be used when the result method is called.

here is how i am doing it:  
var \_me:String;  
for(\_me in args){  
$xml. **proto** [\_me] = args[\_me];  
}

this is working great, until i have more then one call to the function which makes this happen. then i find that the last of the calls overrights all of the values…

here is my question: are variables added to an object using **proto** static? if so, how can i make them instance?

is there any other way to add a variable to a class, while still using typed var statments?

-E
