2 Replies Latest reply on Jun 16, 2010 7:01 AM by brandon_haslip

    Scrolling to a postion


      I have 5 images lined up in a row next to each other. I would like to click a button and have everything scroll right to the next image, I can't seem to find anything online. Any help is greatly appreciated. Thanks.

        • 1. Re: Scrolling to a postion
          Ned Murphy Adobe Community Professional & MVP

          Look into using the Tween class to have your x property gradually change when you click the button.

          • 2. Re: Scrolling to a postion
            brandon_haslip Level 1

            Ok, so I have the Tween class working well. Thanks. Now here is my new problem. Each image is 1000px by 500px. I have a button that when clicked slides the image panel left 1000px to show the next image.  When it gets to that position "next" position I want to load a little movie on top  of it. Here is the code I was using to test where the position was but it is not working. Any thoughts??


            var mainpos = _root.panels._x;


            if (mainpos = -1000) {
                trace("Image 2");
            } else {




            if (mainpos = -2000) {
                trace("Image 3");
            } else {




            if (mainpos = -3000) {
                trace("Image 4");
            } else {




            if (mainpos = -4000) {
                trace("Image 5");
            } else {