Hace tiempo que quiero hacer esto no lo puedo resolver, a ver si alguien puede ayudarme:
¿Cómo hago para que un Sprite tenga igual dimensiones que la imagen que cargue?
Código ActionScript :
import flash.display.Sprite;
var miFoto1:Loader = new Loader();
miFoto1.load(new URLRequest("mar.jpg"));
this.addChildAt(miFoto1,1);
this.miFoto1.x = 80;
var fondo:Sprite = new Sprite();
fondo.graphics.beginFill(0x000000);
fondo.graphics.drawRect(0,100,200,300);
this.addChildAt(fondo,3);
fondo.width = miFoto1.width;
fondo.height = miFoto1.height;Gracias!
