更改HBox的背景图像

我已将我的软件的徽标图像分配给HBox,如下所示 -
<mx:HBox id="logoBox" width="98%" textAlign="left" backgroundSize="100%" horizontalAlign="left" height="18%" backgroundImage="images/img_header_new_3-bg.jpg" verticalAlign="bottom" backgroundColor="#1573A4">
现在我需要将backgroundImage更改为事件上的其他图像。 怎么做到这一点?我无法使用id“logoBox”引用backgroundImage属性     
已邀请:
BackgroundImage是HBox的一种风格。创建组件后,您需要设置样式,如下所示:
logoBox.setStyle("backgroundImage","images/img_header_new_2-bg.jpg");
    

要回复问题请先登录注册