1 Reply Latest reply on Sep 3, 2009 7:51 AM by kglad

    Setting _height and _width prevents keyframe movement?

    The Last Ride In

      I have a movie clip that jumps around over the course of my movie using standard keyframe animation. At every keyframe, it calls a function that moves a dynamic text box on top of it, autosizes the text box, then alters the movie clip's _width and _height to fit that of the text box.


      The problem is, while the resizing code works fine and the text always fits, the act of altering the _width and _height seems to cancel out the keyframed positioning. The movie clip changes size, but it's forever locked to the position of the first keyframe. Does anybody know what's wrong?


      this is the function:


      textUpdate = function (current)
          textBox._x = textBG._x + 10;
          textBox._y = textBG._y + 10;
          textBox.text = myXML.firstChild.childNodes[current].firstChild.nodeValue;
          textBG._height = textBox._height + 30;
          textBG._width = textBox._width + 30;
          if (textBox.text == "undefined")textBox.text = " ";