8 Replies Latest reply on Jan 17, 2007 3:14 AM by Igor2082

    Please help with scrollpane class

    Igor2082
      Hello Guys! Please can anyone help me with code below. Simple copy/paste it to first frame of the new flash movie. Just can not understand why scrollpane works wrong with movieclip

      /////////////////////////////////////////////////

      // creating movieclip
      my_mc=this.createEmptyMovieClip("my_mc", 0);
      var my_mcl:MovieClipLoader = new MovieClipLoader();

      // insert content (text and square)
      var txt_obj=my_mc.createTextField("mytext_1", level, 0, y_coord, 300,50);
      txt_obj.text="test"
      my_mc.beginFill(0x99FF00, 100);
      my_mc.moveTo(0, 0);
      my_mc.lineTo(300, 0);
      my_mc.lineTo(300, 300);
      my_mc.lineTo(0, 300);
      my_mc.lineTo(0, 0);
      my_mc.endFill();


      // creating ScrollPane and link it to MovieClip
      var my_sp:mx.containers.ScrollPane;
      var my_sp=this.createClassObject(mx.containers.ScrollPane, "my_sp", 10);
      my_sp.setSize(150, 150);
      my_sp.move(100,0);
      my_sp.spContentHolder=my_mc;
      //////////////////////////////////////////////////////////////////////////