0
嗨,大家好我的問題是,當我在狀態1中創建一個按鈕,並根據代碼點擊它,它應該在另一個名爲expand的狀態下創建一個組。但是根據我的代碼,它仍然在當前狀態下進行組合。任何指導都將不勝感激。更改視圖狀態
mybutton.addEventListener(MouseEvent.CLICK, max);
public function max(event:MouseEvent):void
{
currentState = 'expand';
var s:String;
s = "abc";
var myGroup:Group = new Group();
myGroup.id = s;
addElement (myGroup);
container_Class2(myGroup);
}
的addElement(爲myGroup)將於VisualElement添加到視圖無論哪種狀態,它都將在所有狀態中顯示。 –