Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/05/2008, 02:45
chefnelone
 
Fecha de Ingreso: diciembre-2005
Ubicación: Barcelona
Mensajes: 1.428
Antigüedad: 18 años, 4 meses
Puntos: 15
Respuesta: crearle borde a MC con actionscript?

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:
fgrande.drawBorder(0xffffff,4);

Pero no me funciona.

Alguna idea