Hi all.

Hi all. I am playing around with the parallax script to get the same affect scrolling vertically. I set the position and height but can’t figure out how to change the direction. The item still scrolls across the page. Here’s the script with the changes.

var name= “parallax” //the label of the item

var amount = 0.5 //the parallax effect, between 0,1

var cont=LL.getEvent().getContainer();

var it=cont.getItemByLabel(‘vert_1’);

it.setPosition(cont.getPositionY()* amount+it.getHeight()* (amount+1),0);

]]>

10 Commentsto Hi all.

  1. Anonymous says:

    < ![CDATA[

    Switch input: it.setPosition(0,…);

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Lukas Morawietz thanks for the response. I am still at crawling stage when it comes to scripting. Can you show me where I should add this?

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Just switch the arguments in your last line of code

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Hehe, I am none the wiser but I’ll give it a try.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Hi Lutz Linke​​. I hate to ask but I hit a wall. Can you help me with this script? I’m trying to achieve the play store scroll animation using parallax scroll script. Any help would be appreciated. 

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Hi TrianguloY can you help me with is please?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    As Lukas Morawietz​ said: instead of setPosition(cont…, 0) use setPosition(0, cont…)

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Ah, you commented you want to achieve the Play Store effect. That’s a bit more difficult. Requires one layer with the image that scrolls slower up and another above that scrolls normally and covers the image.


    Sadly I’m busy today, can’t do an example right now. Sorry.

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Thanks for making that clear to me Lutz Linke​​​, you’re a champ.

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Thanks +Lutz Linke It worked. I have 2 layers with 1 scrolling over the other at normal speed. The only difference to play store is that there is no fading search bar. Cheers mate.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *