3 Replies Latest reply on Jun 24, 2013 9:02 AM by GangamStyle

    Object move question



      I think the whole day on this thing: In this example http://www.stanko-b.com/heelbopps/ (project https://www.dropbox.com/s/dr41wme9uqnm0a9/heelbopps4.zip) when you press the "down" button, the screen scrolls down to a particular object.

      Сode assigned to the button "down" is:

      var element = sym.$("object1");

      $('html,body').animate({scrollTop: element.offset().top}, "slow");


      My question. How to make itself the "down" button to move to the  "object1"?

      In other words, what would I need one object, wherever it was (on click), moved to other objects on the Y axis?


      Thank you.

        • 1. Re: Object move question
          heathrowe Most Valuable Participant

          In your Stage > compositionReady event handler, add the following code block just before your yepnope.

          If I assume correctly, you will only need one of the arrowDown elements to move when the page scrolls or when the arrow is clicked. In this case I used your 'arrowDown_Products' element; then remove the remaining three since they will no longer be needed.


          /////------- Copy Start ---------- //////



                 var element = sym.$("arrowDown_products");



                      .animate({"marginTop": ($(window).scrollTop() -45) + "px"}, 100 );



          /////--------- End Copy --------- ///////


          Hope this helps. - I havn't tackled the click event but its going to require some conditional logic to function 100%.


          • 2. Re: Object move question
            Zaxist Level 4

            mabe this work, try this


            var element = sym.$("object1");

            $('html,body').animate({scrollTop: element.offset().top}, "slow");



            sym.$("Your button Name Here").animate({scrollTop: element.offset().top}, "slow");





            1 person found this helpful
            • 3. Re: Object move question
              GangamStyle Level 1

              Hi, Darrel!

              I'll explain everything properly. I'll try.

              I'm trying to make a website for my sister. She is an artist, so the site is not big, and I think that is quite able to do it in the Adge.


              The big images are of different height. I want a group of small pictures has always been one and the distance from the big picture. In the example I did this, but it's just "stop the timeline at the given position," and I wont to slide preview pic's group to the specified positions. Aw really do this? I'm sure you'll be able to give a good idea.