# \[AS2\] Color prototyping problem

**URL:** <https://forum.kirupa.com/t/as2-color-prototyping-problem/125112>\
**Category:** Uncategorized\
**Created:** [October 10, 2004, 2:09pm UTC](https://forum.kirupa.com/t/as2-color-prototyping-problem/125112 "2004-10-10T14:09:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eklypse](https://avatars.discourse-cdn.com/v4/letter/e/90db22/32.png) [@eklypse](https://forum.kirupa.com/u/eklypse)\
**Post date:** [October 10, 2004, 2:09pm UTC](https://forum.kirupa.com/t/as2-color-prototyping-problem/125112/1 "2004-10-10T14:09:50Z")

</div>

Hi guys!  
I’ve been playing around with AS2 under FlashMX 2004 Pro recently, and with prototypes in particular. I’ve seen several examples of prototyping (i.e. the Robert Penner’s color\_toolkit) that define proto in the Color Object.  
So I’ve come up with this easy script on Stage (myShapeMC is a simple square) :

```auto

Color.prototype.dummy= function(){
trace("into dummy");
}
var c:Color = new Color(_root.myShape);
c.dummy();

```

This produces the following error :

```auto

**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 5:
There is no method with the name 'dummy'.
c.dummy();

```

Am I missing something or is it simply impossible to add prototypes to the Color Object in ActionScript 2 ???

Thanks in advance…
