hi guys my problem is when i create a button in state 1 and click on it according to code it should make a group in another state named as expand. However according to my code it is still making group in current state 1. any guidance will be appreciated.
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);
}