I have actionscript file with a binding {someBinding}…
The Main.mxml is where all the action happens. If I set {someBinding} in the “text” of a label component I will have a number.
I have another form.mxml file. Where I want that binding to be in, but it can’t find such binding.
I need to have that {someBinding} in that other mxml, the same way as in the Main.mxml
Thanks, Yan
You can’t a value in one component (or File) to a value in another component (or file) in the way you seem to be asking. You’ll have to expose those related values as properties and set the values.
This type of approach should work:
First add a property to component 2 and make it Bindable. Do this in a Script block, like this:
Then bind it to something in your MXML of the same component, like this:
Now some component will contain this one:
So, when the othervalue changes it will change the hBoxWidth value on the customHBox component which will in turn change the width property on the HBox inside of customHBox.
Does that make sense?