0 Replies Latest reply on Aug 4, 2010 2:31 PM by jkintner

    setting component variable in MXML or AS


      If I do this in MXML, it works perfectly:


          <components:MyGraph id="graph" horizontal="400" vertical="300" />


      But if I try to set these last two variables in AS, it doesn't work.   I just get the default values set in the creationComplete phase of the MyGraph component.    (wireLength and graphWidth are set to 400 and 300)


          graph.vertical = wireLength;
          graph.horizontal = graphWidth;


      When I use the AS, I am setting these values in the initialize phase of the main application.  I assume either I'm doing it at the wrong time (though I have tried creationComplete and various other combinations and it hasn't worked.)


      Anyone know how to fix the AS?