1 Reply Latest reply on Oct 31, 2015 9:18 AM by kglad

    Blank gap at the end of a scrollPane?

    lorenzom5479603

      Hello.

      I'm having this error with a scroll pane I added to my stage. The scrollPane element is dynamically created through some lines of code. At the end of the movieClip contained in the scrollPane, though, a blank space appears.

       

      Schermata 2015-10-30 alle 21.36.01.png

       

      This is some of the code I'm working with:

      //variables

      var spH:int = 307;

      var spW:int = 700;

      var spX:int = 0;

      var spY:int = 80;

      var sp:ScrollPane = new ScrollPane();

      var totalMC:MovieClip = new MovieClip();

       

      //scrollPane properties

      sp.setSize(spW, spH);

      sp.x = spX;

      sp.y = spY;

      sp.horizontalScrollPolicy = "off";

       

      //totalMC is at this point builded and defined

       

      //add scrollPane to the scene

      sp.source = totalMC;

      addChild(sp);

      setChildIndex(sp, 3);

       

      If I only add the totalMC movie clip to the stage, the gap doesn't show, so I figured it must be an issue related to the scrollPane properties themselves.

       

      Can anybody out there help me out?

      Thanks.