4 Replies Latest reply on Sep 3, 2006 6:17 PM by

    attach movie clip

      Hello i asked this in my another topic but that topic was mainly related with another problem.

      my question is;

      i have 3x3 square boxes ( "box_mc"s movie clips duplicated from 1 "box" movie clip on stage)

      I want to put a small box (that is movie clip "smallmc") in front of bigger one(that is one of another mc "box_mc" already placed on stage). When i click big box( i mean "box_mc") i want to attach an instance of "smallmc" in front of big one.

      i have this code in "box" mc ;
      on (press) {
      if (this.selected == 0) {
      trace("box is selected");
      selected = 1;
      _root.attachMovie("smallmc","smallmc"+count,getNextHighestDepth(),{_x:this._x,_y:this._y} );
      _root.count++;
      trace(_root.count);
      } else {
      trace("unselected");
      selected = 0;
      _root.count--;
      trace(_root.count);
      }
      }

      but this code puts "smallmc" under "boxmc" :(( and 1 more problem ;

      i have 3x3 big boxes; and when i click a "boxmc" it puts 1 smallmc then i click another "boxmc" it puts "smallmc" but previous one dissappearing.(but this is not prior problem i think first i should put small boxes in front of big ones)

      thank you for your all helps advices