Hey all, I am new with flex, coming from JavaScript and perl.
I am writing an application that will have lots of MXML components
like a login component, register component and many more. The problem
is I am trying to have all the components talk to each other, I am
having trouble doing that. This is my problem, I have a viewStack and
I created a method like this
private var _stackName:String;
private var _stateName:String;
private var _runStackChild:String;
public function ChangeState(stackName:String, stateName:String)void
{
_stackName = stackName;
_stateName = stateName;
_runStackChild = _stackName + ".selectedChild = " + _stateName ;
_runStackChild;
}
<mx:Button id="btnOne" click="ChangeState('vsTop','register');
So when I click the button the mothod ChangeState is called and passed
are the 2 variables. At the end ChangeState should run the command
vsTop.selectedChild = register;
If I clear the method and just add vsTop.selectedChild = register;,
the stack is changed, but when I run _runStackChild; nothing hapends.
What am I missing???
Thanks,
Timgerr