Trying to make a simple component..and trying to set the background image..
package{
import flash.display.Bitmap;
import mx.containers.HBox;
public class Hbox1 extends HBox{
[Embed(source="SkyBackground.jpg")]
[Bindable]
public var imgcls:Class;
public function Hbox1():void{
var img:Bitmap = new imgcls() as Bitmap;
setStyle("backgroundImage",img);
}
}
}

