2 Replies Latest reply on Apr 18, 2011 5:41 PM by FTGLM

    Issues creating scrolling images for photo gallery

    FTGLM

      Hi all,

       

      I'm attempting to create a thing where my thumbnails will scroll across the bottom of the page, like when you put the mouse on the right it scrolls right and visa versa.  I found a great tuturial only to realize halfway in that it was done with Flash 8, therefore apparently quite a few things have changed.  And this is my first stab at Flash!

       

      The first place i noticed is when my motion tween didn't work, so I instead created a 'Classic Tween' finding it had the same affect as 'Motion Tween' in Flash 8, however as I progressed in the tut, I don't think the results were the same.

       

      My images scroll but after creating a _xmouse<40){........prevFrame, there only continue to scroll, the prevFrame command doesn't work! 

       

      So to my question...does anyone know of a good tut for this type of thing for CS5?  OR, is anyone really familiar with both Flash 8 and CS5 and could help me pinpoint the differences for what I'm attempting to create?

       

       

      Thank you SO MUCH, any help is really appreciated!

       

      Giuseppe

        • 1. Re: Issues creating scrolling images for photo gallery
          FTGLM Level 1

          Ok, so I think the issue isn't the type of tween but the coding. Script from F8 is much different than AS3?  I read that _root is no longer used?

           

          So what would this code be in AS3?

           

          _root:.onEnterFrame=function(){

               if(_root._xmouse<40){

                    imgBar.prevFrame();

                    imgBar.prevFrame();

               }

          }

           

           

          Thanks,

           

          Giuseppe

          • 2. Re: Issues creating scrolling images for photo gallery
            FTGLM Level 1

            So I figured it out after googling for a while and guess and testing...

             

            MovieClip(root).addEventListener(Event.ENTER_FRAME, enterFrameHandler);

             

            function enterFrameHandler(event:Event):void

            {

            if (MovieClip(root).mouseX > 600 && mouseX < 800 && mouseY > 450)

            {

            imgBar.nextFrame();

            }

            if (MovieClip(root).mouseX > 800 && mouseY > 450)

                {

                    imgBar.nextFrame();

            imgBar.nextFrame();

                }

                if (MovieClip(root).mouseX < 300 && mouseX >100 && mouseY > 450)

            {

            imgBar.prevFrame();

            }

                if (MovieClip(root).mouseX < 100 && mouseY > 450)

                {

                    imgBar.prevFrame();

            imgBar.prevFrame();

                }

            }