3 Replies Latest reply on Feb 19, 2010 11:48 AM by flairjax

    Changing s:state properties on the fly with Actionscript?

    flairjax Level 1

      How would you go about changing state properties on dynamically or on-the-fly with Actionscript?


      Given the code below:

       

      <s:postLayoutTransformOffsets>
              <s:TransformOffsets id="tOffsets"
                                   scaleX="1" scaleY="1"
                                   x.hovered="-30" y.hovered="-25" scaleX.hovered="1.5" scaleY.hovered="1.5"
                                   x.selected="-25" y.selected="-25" scaleX.selected="1.2" scaleY.selected="1.2" />

      </s:postLayoutTransformOffsets>

       

       

      How would I change the x.selected and y.selected with Actionscript during runtime and/or set it to bindings?

       

      This of course does NOT work.


      private function changeThings( val:Number ) : void

      {

        someOtherNumber:int = 244;

        tOffsets.x.selected = 100 + someOtherNumber;  //does not work

      }

       

      Any ideas?  Can't seem to find any documentation on this.