5 Replies Latest reply on Apr 13, 2011 10:41 PM by kglad

    Scroll Bar for a movieclip with dynamic content

    Ron Colmen Level 2

      How do I make the scroll bar work for a movieclip with dynamic content.

       

      var senderLoad:LoadVars = new LoadVars();

      var receiveLoad:LoadVars = new LoadVars();

      senderLoad.sendAndLoad("http://www.web.com/my_php.php",receiveLoad,"POST");

      receiveLoad.onData = function(src) {

           var messageA:Array = src.split(",,,");

           messageA.pop();

       

      var xPosition:Number = 0;

      var yPosition:Number = 0;

       

      for(var i:Number=0; i<messageA.length; i++){

                 var msgA:Array = messageA[i].split(",,");

       

      _root.patHolder.attachMovie("garSpecBtn1","btn"+i,_root.patHolder.getNextHighestDepth());

       

      _root.patHolder["btn"+i]._x = xPosition;

      _root.patHolder["btn"+i]._y = yPosition;

       

      yPosition = yPosition + 31.0;

       

      _root.patHolder["btn"+i].textBlack.text = msgA[0];

       

       

      _root.patHolder["btn"+i].number_lnk = "http://www.web.com/images/"+msgA[0]+".png";

      _root.patHolder["btn"+i].txtN = "Pattern "+msgA[2];

       

       

      _root.patHolder["btn"+(i)].onRollOver = btnOverNumber;

      }

      }

       

      The scroll bar should work with patHolder.