3 Replies Latest reply on Mar 17, 2010 8:41 AM by msakrejda

    Binding

    hidarikani Level 2

      I can bind  a button's label to a private property of the Application tag:

       

      <mx:Button id="myButton" label="{privatePropertyOfApplicationTag}" />
      

       

      How do I do that with ActionScript?

      BindingUtils class seems to support only public property binding :/

        • 1. Re: Binding
          AdrianWiecek Level 3

          Hi,

           

          How about creating public getter and setter for this privatePropertyOfApplicationTag and bind to this property?

           

          Regards,

          Adrian

          1 person found this helpful
          • 2. Re: Binding
            hidarikani Level 2

            Some things that are easy in mxml are impossible in ActionScript and vice-versa.

            • 3. Re: Binding
              msakrejda Level 4

              No. MXML compiles down to ActionScript, so anything possible in MXML is possible in ActionScript. You're right that the reverse isn't true.

               

              To answer your specific question, you can declare bindings to private variables in MXML, but this doesn't really establish bindings--it only evaluates the expression (and in fact, the compiler will issue a warning to that effect).