# Color object problems

**URL:** https://forum.kirupa.com/t/color-object-problems/96348
**Category:** Uncategorized
**Created:** [December 8, 2003, 6:20am UTC](https://forum.kirupa.com/t/color-object-problems/96348 "2003-12-08T06:20:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![aallman](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@aallman](https://forum.kirupa.com/u/aallman)
#### Post date: [December 8, 2003, 6:20am UTC](https://forum.kirupa.com/t/color-object-problems/96348/1 "2003-12-08T06:20:24Z")

</div>

Hello all-

I am having a problem using the color object. I have a class I created and want to assign it a color object upon creation.

[AS]  
anchorClass.prototype.onLoad = function() {  
this.myColor = new Color(this);  
};  
[/AS]

Why doesnt this work? The result in the debugger when I select the instance and look under the variables tab shows the ‘myColor’ variable but when I expand it it goes on forever.

+myColor  
+target  
+myColor  
+target  
… this goes on forever…

Thanks,  
Andy

PS - the attached fla uses a workaround but the above code is in it
