Actionscript 3 重新加载AIR应用程序删除flex中的皮肤和背景图像

Actionscript 3 重新加载AIR应用程序删除flex中的皮肤和背景图像,actionscript-3,apache-flex,air,flex4.6,Actionscript 3,Apache Flex,Air,Flex4.6,我正在做空气应用。在其中我放置了刷新按钮来刷新应用程序。当用户单击下面的“刷新”按钮时,请刷新我的应用程序 protected function onRefreshClickHandler(event:MouseEvent):void { var app:WindowedApplication = WindowedApplication(FlexGlobals.topLevelApplication); var mgr:ProductManager = new ProductManager("

我正在做空气应用。在其中我放置了刷新按钮来刷新应用程序。当用户单击下面的“刷新”按钮时,请刷新我的应用程序

protected function onRefreshClickHandler(event:MouseEvent):void
{
var app:WindowedApplication =
WindowedApplication(FlexGlobals.topLevelApplication);

var mgr:ProductManager =
new ProductManager("airappinstaller");

mgr.launch("-launch " +
                        app.nativeApplication.applicationID + " " +
                        app.nativeApplication.publisherID);

app.close();
}
上面的代码工作得很好
现在,当应用程序启动时,按钮的skinclass和borderConatiner的backgroundImage仍然不起作用

<s:Button click="onRefreshClickHandler(event)" 
                  buttonMode="true" skinClass="skins.ButtonRefresh"/>

以及:


我不知道为什么会发生这种奇怪的事情

有什么解决办法吗?
重新启动应用程序时如何恢复皮肤


谢谢。

现在,我得到了问题的答案。
我通过在运行时在
creationComplete
上提供
skinclass
backgroundImage
来解决这个问题,比如:

borderContainer.setStyle("backgroundImage","assets/images/back.png");
btnRefresh.setStyle("skinClass",CustomButtonRefreshSkin);

希望,它能帮助其他人。

愿意为否决票发表评论吗。
borderContainer.setStyle("backgroundImage","assets/images/back.png");
btnRefresh.setStyle("skinClass",CustomButtonRefreshSkin);