# Actionscript error not understood

**URL:** <https://forum.kirupa.com/t/actionscript-error-not-understood/224468>\
**Category:** Uncategorized\
**Created:** [May 2, 2007, 4:39pm UTC](https://forum.kirupa.com/t/actionscript-error-not-understood/224468 "2007-05-02T16:39:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![korkor5](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@korkor5](https://forum.kirupa.com/u/korkor5)\
**Post date:** [May 2, 2007, 4:39pm UTC](https://forum.kirupa.com/t/actionscript-error-not-understood/224468/1 "2007-05-02T16:39:10Z")

</div>

Hello all!

I am tryin to add a property to the stage by doin this:

var sh = Stage.height + 4;  
var sw = Stage.width + 4;

var rp = 0;//let us have a start point  
trace(“stage height = " + sh + " & stage width = " + sw + " in pixels”);  
setBG = function (col)  
{  
with (\_level0) { clear(); if (col != undefined) { beginFill(col); moveTo(rp, rp); lineTo(sw, rp); lineTo(sw, sh); lineTo(rp, sh); endFill(); } } this.bg = col;  
};

getBG = function (){ return this.bg;  
};

Stage.addProperty(“bgColor”,getBG,setBG);

but i get this error when i run the code:  
The property being referenced does not have the static attribute.

what am i doing wrong

please help me out

thanx

korkor5
