the code should be like this:
Object.defineProperty(DisplayObject.prototype, '_proxied_visible', { // Set on proxied, as we're already observing
get: function() {
for (var p = this.parent; typeof p !== 'undefined'; p = p.parent){
if (!p.visible)
return false;
}
return this._visible;
},