3 Replies Latest reply on Apr 11, 2008 9:02 AM by kglad

    multiple images in a scrollPane

    hmcka Level 1
      Hey. I want to add multiple images (in movie clips) to a scrollPane, and it's giving me more problems than I think it should. I thought of adding many images to one movie clip, but what I may end up doing is switching the order of the images several times, so I began to think of another way.

      What I have now is a scrollPane with two movie clips in it. They are on top of one another. I thought that I should be able to leave the y value of one at 0 and set the other so that it's 200 and then they would scroll one after the other. I haven't been able to get this to work. Is this something that is do-able within a scrollPane, or not? I'm working the best I can with the AS, but it's still new to me.

      Thank you for your insight. Create a great day.
        • 1. Re: multiple images in a scrollPane
          kglad Adobe Community Professional & MVP
          add one movieclip to the scrollpane and then attach all others that you need to that one.
          • 2. Re: multiple images in a scrollPane
            hmcka Level 1
            Thank you, I’ve been working on trying your suggestion. I’ve been able to attach the movie to the first, however, the second movie is not showing up within the scroll pane. To complicate matters, the third movie also seems to cancel out the second, even when I attach the movie outside of the scrollPane. I have one layer, and the movie clips I’m working with are Image1_mc, Image2_mc, and Image3_mc.

            My script:

            this.createClassObject(mx.containers.ScrollPane, "my_sp", 20);
            my_sp.move(0, 30);
            my_sp.setSize(650, 250);
            my_sp.contentPath = "Image1_mc";

            my_sp.attachMovie("Image2_mc", " Image2_mc", 0, {_x:0, _y:100});
            my_sp.attachMovie("Image3_mc", " Image3_mc", this.getNextHighestDepth(), {_x:0, _y:200});  variations of these two lines are what I’ve been tweaking

            var nstepListener:Object = new Object();
            nstepListener.change = function(evt_obj:Object) {
            my_sp.content._alpha = my_nstep.value;
            my_nstep.addEventListener("change", nstepListener);
            • 3. Re: multiple images in a scrollPane
              kglad Adobe Community Professional & MVP
              create an empty movieclip in my_sp.spContentHolder and attach/load to that empty movieclip.