Sharing variables between mxml components

Posted by Kamo on Stack Overflow See other posts from Stack Overflow or by Kamo
Published on 2010-05-29T04:55:36Z Indexed on 2010/05/29 5:02 UTC
Read the original article Hit count: 380

Filed under:
|
|
|
|

I have several mxml components in an app, all of which need the same variable called genericX. I've included that variable in the main mxml and made it public

[Bindable] public var genericX:Number = 102;

but I still can't access it from other mxml components. If I try to do this for example, it doesn't recognize the variable.

<s:Button x="{genericX}" label="Click" />

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript