1 Reply Latest reply on Feb 23, 2007 8:02 AM by kglad

    Image Movie Clip fails on Draging

    Swiss74
      Unable to drag the Movie clip which consist of images, but the other clip which was drawn dinamically works on draging,
      simple I want to drag the Image which was loaded at run time.
      Regards
      Suresh

      // Creating first Movie Clip
      var square_mc:MovieClip = createEmptyMovieClip("square_mc", 150);
      square_mc.lineStyle(1, 0x000000, 0);
      square_mc.beginFill(0xFF0000, 100);
      square_mc.moveTo(100, 100);
      square_mc.lineTo(200, 100);
      square_mc.lineTo(200, 200);
      square_mc.lineTo(100, 200);
      square_mc.lineTo(100, 100);
      square_mc.endFill();

      // Creating second Movie Clip
      var containerBG:MovieClip = createEmptyMovieClip("containerBG", 100);
      var mcLoaderBG:MovieClipLoader = new MovieClipLoader();
      mcLoaderBG.addListener(this);
      //Give any image file name instead of 1.gif
      mcLoaderBG.loadClip("1.gif", containerBG);

      //Draging works for this clip
      square_mc.onPress = function() {
      this.startDrag();
      };
      //Draging works for this clip
      square_mc.onRelease = function() {
      this.stopDrag();
      };
      //Draging is not working for this clip
      containerBG.onPress = function() {
      this.startDrag();
      };
      //Draging is not working for this clip
      containerBG.onRelease = function() {
      this.stopDrag();
      };