quiero darle un borde dinamicamente a un MC.(digamos al MC: "miMC"
Encontré esta funcion:
MovieClip.prototype.drawBorder = function(color,thickness){
var t = thickness;
with(this){
clear();
var b = getBounds(this);
var xs = 100/this._xscale;
var ys = 100/this._yscale;
lineStyle(t,color,100,true,'none','square','miter');
moveTo(b.xMin-t/2*xs,b.yMin-t/2*ys);
lineTo(b.xMin-t/2*xs,b.yMax+t/2*ys);
lineTo(b.xMax+t/2*xs,b.yMax+t/2*ys);
lineTo(b.xMax+t/2*xs,b.yMin-t/2*ys);
lineTo(b.xMin-t/2*xs,b.yMin-t/2*ys);
}
}
Luego la invocas con esta linea y debería funcionar:
miMC.drawBorder(0xffffff,4);
Pero no me funciona.
Alguna idea
Gracias
