Setting an object using the object = value
notation is run only once, when execution hits that point in the code. In the event of a static
variable, that occurs the first time the variable is called (I may be wrong and it may be the first time the Class is called or imported, end result here is the same, though).
So you can't bind that way. The way binding works is when a Bindable
variable is physically set, it dispatches an event that objects which are binded to it are listening for. What you do there is set the variable once and never touch it again.
You can bind one of two ways:
- In MXML using the
{{ property }}
notation
- In AS3 using
BindingUtils
. BindingUtils
attaches an internal event listener (i.e. you don't have to attach it yourself) and updates the provided property. I am unsure it will work with a static
object, however.
I did check the source code for mx.resources.IResourceManager#getString()
and verified it is a bindable object, so you are good there.