0 Replies Latest reply on Dec 11, 2007 6:01 AM by bartonsmith

    If mc._x = __ not working

    bartonsmith Level 1
      Hey I'm trying to run a code which motion tweens an mc off the stage, and only then does it tween an mc onto the stage. Im using the following script where _x = -200 is the position when it is off the stage.

      topbar_box.onRelease = function() {
      var moveSectionX:Tween = new Tween(_root.content.section_holder, "_x", Strong.easeIn, 61, -200, 2, true);
      var moveSectionY:Tween = new Tween(_root.content.section_holder, "_y", Strong.easeIn, -25, 768, 2, true);
      if (_root.content.section_holder._x = -200) {
      loadMovie("about_section.png", _root.content.section_holder);
      var moveSectionX:Tween = new Tween(_root.content.section_holder, "_x", Strong.easeOut, 500, 22, 2, true);
      var moveSectionY:Tween = new Tween(_root.content.section_holder, "_y", Strong.easeOut, -500, -7, 2, true);

      It loads the new file into the mc before it has a chance to move off the stage. I tried loading the new file into a new empty mc, and that works, however the new file comes onto the stage too early and doing it this way would leave me with too many empty mcs to load files into.

      Cheers
      B