Can't you do this...

put your ViewStack in a control and put a bindable variable in that
control and each of the FormXView controls as well

e.g...

and in each of the ViewXControls script blocks...

[Bindable] public var my_var_ref:String;

and in the enclosing control...

<script>
<![CDATA[
[Bindable] public var my_var:String;
]]>
</script>
<mx:ViewStack>
  <views:Form1View my_var_ref={my_var}/>
  <views:Form2View my_var_ref={my_var}/>
  <views:Form3View my_var_ref={my_var}/>
...
</mx:ViewStack>

Operate on my_var_ref in each of the views and binding will make sure
the value is transferred to the my_var_ref control variables.

If you want to take it a step further and have a genuine app wide
singleton you can put my_var on your app and either add a public
static getInstance() method to your app or refer to it through
myApp(Application.application).my_var;

hth
Simon

--- In [email protected], "markflex2007" <[EMAIL PROTECTED]>
wrote:
>
> Hi,
> 
> I have some screens under ViewStack like this
>   
>               <mx:ViewStack>           
>                <view:Form1View />
>                <view:Form2View />     
>                <view:Form3View />     
>                <view:ThankyouView />           
>       </mx:ViewStack>
> 
> I have a variable in Form1View  but how I can get the variable in 
> Form2View.
> 
> backend language have session variables,I am not sure if Flex also 
> have the same function like session variable.
> 
> Please help me out.Thanks
> 
> Thanks
> 
> Mark
>


Reply via email to