Need help with a continious thumbnail scroller

Hi everybody,

This is my first post on Kirupa. I’m learning AS3 at the moment, but ran into some problems while building a thumbnail scroller that displays some thumbs from an XML file.

The idea is that when you move your mouse, the list of thumbnails start to scroll in a loop (continious scroll).

Loading the images is no problem.
Moving the container with these thumbnails in it, isn’t a problem either.
But making it loop…is a bit of a problem:)

This is the relevant part of my code so far:


private function doScroll(e:MouseEvent)
        {
            
            if (e.stageY < 90)
            {
                _widget.stage.addEventListener(Event.ENTER_FRAME,scrollDown);
            }

            
            function scrollDown(e:Event)
            {
                _widget.slidesContainer.y--;

            }

            
            if (e.stageY >120)
            {
                _widget.stage.addEventListener(Event.ENTER_FRAME,scrollUp);
            }
            
            
            function scrollUp(e:Event)
            {
                _widget.slidesContainer.y++;
                
            }
            
            
        }

This will move my “slidesContainer” up/down, relative to my mouse position.
But when the slidesContainer scrolls down, I actually want to duplicate it and place it BEFORE the original slidesContainer, so that it will loop…

Any idea how to do this?
Thnx!

Vic.