How to manipulate StateGroup from Javascript

hi

I have some animation described inside StateGroup

<StateGroup ux:Name="state" Transition="Exclusive">
  <State Name="loginButtonState">
  </State>
  <State Name="signupFormState">
  </State>

  <State Name="loadingState">
  </State>
</StateGroup>

I can change current state like that

<Clicked>
    <Set state.Active="signupFormState" />
</Clicked>

but how can I do it from javascript? Thank you in advance

Hi!

Databind the Active property of the stategroup, or call goto() on the state in question, e.g.

loginButtonState.goto();

Note that you have to use ux:Name for this to work, not Name