2 Replies Latest reply on Mar 30, 2011 8:45 PM by _danada

    Animating a horizontalCentered Spark Label

    _danada

      Hey,

       

      I'm using the s:Move component to manipulte a label's position with yTo:

       

      <s:Move id="labelIn" yTo="211"/>
      

       

      Then I call

       

      labelIn.play([myLabel]);
      

       

      This properly animates my label. The problem happens when I change the labels text before playing the animation. For example:

       

      myLabel.text = "New Text!"; 
      labelIn.play([myLabel]);
      

       

      This causes the label to shake from left to right while animating. The shaking is eliminated by removing the

       

      horizontalCenter="0"
      

       

      parameter from my label, but the label is no longer centered.

       

      Is there a way to animate my label without the shaking?

       

      Thanks,

      ~dan