/* ======================================== createDropShadow ---------------------------------------- (c) Derek Ahmedzai, March 2004 TextField prototype Usage: oTextField.createDropShadow(oTextFormat, [iXOffSet, [iYOffset]]); ======================================== */ TextField.prototype.createDropShadow = function() { trace("createDropShadow (for " + this + ")"); var iLen = arguments.length; if (iLen > 0) { if (arguments[0]) { var tfDS = arguments[0]; var sDesc = tfDS.font + " " + tfDS.size + "px #" + tfDS.color.toString(16); trace(" -> " + sDesc); //create drops shadow var oDS = this._parent.createTextField("oDS", getNewDepth(), 0, 0, 20, 20); with (oDS) { autoSize = "left"; text = this.text; selectable = false; setTextFormat(tfDS); } //shift var iX = 0; var iY = 0; if (arguments[1]) { var iX = arguments[1]; } if (arguments[2]) { var iY = arguments[2]; } else { if (arguments[1]) { var iY = arguments[1]; } } //shift horizontally and vertically oDS._x = iX; oDS._y = iY; //swap depths //swapDepths.call(this, getNewDepth()); swapDepths.call(this, oDS); return oDS; } else { trace(" X - Invalid TextFormat"); return false; } } else { trace(" X - No arguments supplied"); return false; } }