0
votes

I am creating a flex application. I have created one mxml file which having two spark states State 1, State 2, one button and three checkbox. State 1 is a main mxml. When I click on button it goes to State 2. State 2 is another mxml whch I have imported into main mxml like

<summary:mySummary includeIn="mySummaryDetails" />

mySummary mxml also contains four different states.

My need is when I select checkbox from State 1 and click on button then according to selected checkbox I want to show perticular states from mySummary mxml. So how can I achieve this.

2

2 Answers

0
votes

You can add to you click method:

mySummary.currentState = "State1";
0
votes

Try to check your checkbox selection inside your click method.

function buttonClick():void
{
  currentState = "State2";

  if(checkBox1.selected)
     mySummary.currentState = "mySummaryState1";

  if(checkBox2.selected)
     mySummary.currentState = "mySummaryState2";

  ...
}