我已分配我的软件来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");
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top