3 Replies Latest reply on Jun 5, 2007 8:03 AM by Gorka Ludlow

    scroll pane and dynamic content

    jenleeg
      I've created a menu of thumbnails using a movie clip populated by an xml file, and now I want to use a scroll pane to navigate this menu. I have the scroll pane on my timeline, the content path set to my movie clip (menu), however the problem I'm having is populating the menu movie clip because I need an instance name for my actionscript to work, yet there is no longer an instance of that movie clip on the stage. Is there a way to give it an instance name once it's loaded into the scroll pane? Is there a better way to do this?
        • 1. Re: scroll pane and dynamic content
          Gorka Ludlow Level 1
          That's the way to do it, your new reference to your movieclip is:

          scrollpane_instance.content

          Make sure you use the scrollpane_instance.invalidate() method after you update the contents of your inner moviclip so that it redraws itself

          Cheers
          Gorka
          • 2. Re: scroll pane and dynamic content
            jenleeg Level 1
            I'm not really clear on your suggestion... currently in my actionscript I have:

            var currentThumb_mc = menu_mc.createEmptyMovieClip("thumbnail_mc"+i,i);
            currentThumb_mc._x = i * thumb_spacing;

            currentThumb_mc.createEmptyMovieClip("thumb_container",0);
            currentThumb_mc.thumb_container.loadMovie(currentPicture.attributes.thumb);

            menu_mc would be the instance name of my Movie Clip, if it was actually on the stage. Now instead of putting that Movie Clip on the stage, I have the scroll pane on the stage with that Movie Clip in the content path (which is working). So your suggestion for scrollpane_instance.content...... does that go in the actionscript in place of menu_mc?
            • 3. Re: scroll pane and dynamic content
              Gorka Ludlow Level 1
              Yes, try using scrollpane_instance.content instead of menu_mc and let me know how it works.

              Cheers
              Gorka