俺是彻底无语了。
这样的代码有错么?
<?xml version=”1.0″ encoding=”utf-8″?><mx:TitleWindow xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” width=”400″ height=”300″>
<mx:Script>
<![CDATA[
private function unshow():void{
showCloseButton=false;
trace(this.showCloseButton);
trace(this);
}
private function show():void{
showCloseButton=true;
trace(this.showCloseButton);
trace(this);
}
]]>
</mx:Script>
<mx:Button x=”38″ y=”69″ label=”Show” click=”show()”/>
<mx:Button x=”123″ y=”69″ label=”UnShow” click=”unshow()”/>
</mx:TitleWindow>
function test():void{
this.showCloseButton = !showCloseButton;
this.invalidateDisplayList();
}
Sorry, the comment form is closed at this time.