this.subviews[2].showError = function(errormessage) { var delay = 100, xborder = 3, spacer = 2, bottomborder = 4; parent.error.setText(errormessage); parent.bg.setAttribute('bgcolor', 0Xffff66); parent.bg.flash.doStart(); this.animate('x', xborder, delay, false); this.animate('y', parent.error.height + spacer, delay, false); this.animate('width', parent.width - xborder*2, delay, false); parent.animate('height', parent.error.height + this.height + bottomborder + spacer, delay, false); }; this.subviews[2].hideError = function() { parent.error.setText(''); parent.bg.setAttribute('bgcolor', 0xffffff); this.setX(0); this.setY(0); this.setWidth(parent.width); parent.setHeight(this.height); }