# Multiple property prototype

**URL:** https://forum.kirupa.com/t/multiple-property-prototype/69897
**Category:** Uncategorized
**Created:** [November 9, 2004, 2:08am UTC](https://forum.kirupa.com/t/multiple-property-prototype/69897 "2004-11-09T02:08:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bgt](https://avatars.discourse-cdn.com/v4/letter/b/f0a364/32.png) [@bgt](https://forum.kirupa.com/u/bgt)
#### Post date: [November 9, 2004, 2:08am UTC](https://forum.kirupa.com/t/multiple-property-prototype/69897/1 "2004-11-09T02:08:38Z")

</div>

Hi everybody,  
I’m trying to make my first prototype, but I can’t put it to work, I wanted to atribute a property to a variable, so I could call the prototype on to the movie clip, asking for any property, without having to change the prototype code.  
Is it possible?  
Here is my code so far:

MovieClip.prototype.multProp = function (proper,targetv, smooth) {  
this.proper -= (this.proper-targetv)/smooth;  
};  
my\_mc.onEnterFrame = function() {  
my\_mc.multProp("\_x",20, 10);  
};

In this case I used the \_x property, as I could use the \_alpha property like this:

my\_mc.onEnterFrame = function() {  
my\_mc.multProp("\_alpha",20, 10);  
};

but it doesn’t seem to work.  
Anybody got a clue?  
Thank You.
