1 Reply Latest reply on Oct 7, 2008 8:28 PM by kglad

    Disappearing Clips with attachMovie and stopDrag

    rkudrle Level 1
      Hi All,

      I have a simple script. I basically want to have the script attach a new item from the library to the stage on top of the previous item when that item is dragged across the screen. It works up until a point. But for some reason when I drag the 2nd or 3rd object it will make the first one that was attached to the stage completely disappear. My clips and instances are labeled with the unique names as shown in my code below. It doesn't make sense. Any thoughts? Thanks for any input.

      Project1.onPress = function()
      {
      attachMovie("Project1", "Project1_v2", this.getNextHighestDepth(), {_x:Project1._x, _y:Project1._y});
      Project1.startDrag();
      };

      Project1.onRelease = function()
      {
      Project1.stopDrag();
      };

      Project2.onPress = function()
      {
      attachMovie("Project2", "Project2_v2", this.getNextHighestDepth(), {_x:Project2._x, _y:Project2._y});
      Project2.startDrag();
      };

      Project2.onRelease = function()
      {
      Project2.stopDrag();
      };

      Project3.onPress = function()
      {
      attachMovie("Project3", "Project3_v3", this.getNextHighestDepth(), {_x:Project3._x, _y:Project3._y});
      Project3.startDrag();
      };

      Project3.onRelease = function()
      {
      Project3.stopDrag();
      };


      Project3.onRelease = function()
      {
      Project3.stopDrag();
      };