0 Replies Latest reply on Jan 23, 2007 4:01 PM by Paradise_Lost

    Scroller dun work

    Paradise_Lost
      Hi all,

      I'm having problem displaying the content of my XML driven menu within the scroller component. I can see the menu inside the scroller but the it can't scroll down. Its as if the scroller is jammed.I can't even see the arrow button to the scroller.

      My flash setting : player 8; actionscript 2.0

      1) My first frame inserts: box.attachMovie("emptyClip","clip",1); << where box is my scroller

      2) My linkgage clip, "emptyClip" contains as follow...

      var menuXml:XML = new XML();
      menuXml.load("menu.xml");
      menuXml.ignoreWhite = true;
      // "drop" holds the "y" position placement for each created button.
      drop = 0;
      // "level" determines the next available depth a button can be placed in the holder MC.
      level = 0;
      menuXml.onLoad = function(success) {
      if (success) {
      menuItem = this.firstChild.childNodes;
      for (var i=0; i<menuItem.length; i++) {

      item = attachMovie("itemClip", "itemClip" + i, i,{_x:0, _y:20*i});
      // place the clip at far left, and space each
      // clip 20 pixels below the previous

      // the following turns off the hand cursor on mc/btn rollover
      item.useHandCursor = false;

      // Since the dynamic txt field was placed in it's own MC holder
      // with the instance name dyntext, you have to target it here...
      item.dyntext.itemLabel.text = menuItem .attributes.name;
      item.myUrl = menuItem
      .attributes.url;

      // this starts the button fade in on rollover
      item.onRollOver = function() {
      this.gotoAndPlay("fadeIn");
      }
      // this starts the fade back to original position
      item.onRollOut = function() {
      this.gotoAndPlay("fadeOut");
      }
      // this will load the appropriate .swf file into the holder clip
      item.onRelease = function() {
      holder.loadMovie(this.myUrl);
      }
      }
      }
      }

      3) My xml file is as follow:

      <myMenu>
      <myItem name="Home" url="fileone.swf" />
      <myItem name="About" url="filetwo.swf" />
      <myItem name="Stuff" url="fileone.swf" />
      <myItem name="More Stuff" url="filetwo.swf" />
      <myItem name="Play With Us" url="fileone.swf" />
      <myItem name="Play With Yourself" url="filetwo.swf" />
      </myMenu>