Hi All

Hi All,

Quick Question 😉

I have a Screen with vertical Scroll.

i need a trigger/event when reaching specific positions on desktop without interrupting/stop scrolling.

event position changed triggers to often.

any ideas? or not possible?

Thanks in advance 😉

]]>

15 Commentsto Hi All

  1. Anonymous says:

    < ![CDATA[

    event position changed with script with time checking or absolute position checking.


    It depends on what you need it for.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Bogdan Tautu i want to change properties of an item until i reach a specific stop-point.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    So you want something position based.


    You can get the position of the stop point ( if item detached from grid LL.getCurrentDesktop().getItemByLabel(“XXX”).getPositionY() ) and the current desktop position ( LL.getCurrentDesktop().getPositionY() ) and change the item properties according to the difference between the two positions.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Bogdan Tautu thank you bogdan, i will think about, but in this case i can use the position of the desktop itself without calculating differences. the stop-point is fixed. 

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Why do you say that the position change event triggers to often ?

    ]]>

  6. Anonymous says:

    < ![CDATA[

    i think so, or it’s something else.



    i’ll try to change i.alpha when change desktop position.



    LL (stable no beta) crashes very often in this case.



    also the desktop position changes by itself to the stop-point positio.



    i do another test today to be mor specific.

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Pierre Hébert



    i made a new test.


    script triggered by position changed (desktop)



    itm (lockbg) is a panel, which should change transparency when scrol desktop.



    the more I check the more it hooks or desktop “jumps” direct to  stop-point.. no more smooth scrolling. 



    Script is not well coded at the moment(test) , but this should not be a  reason for this behaviour.




    Script:



    var cont=LL. getCurrentDesktop() ;


    var itm=cont. getItemByLabel(‘lockbg’) ;



    var pos=cont. getPositionY() ;


    var trans=255;



    if (pos>-1) {


    trans=255;


    itm. getProperties(). edit(). setInteger(‘i.alpha’,trans). commit() ;


    }



    if (pos< -100 & pos>-200) {


    trans=200;


    itm. getProperties(). edit(). setInteger(‘i.alpha’,trans). commit() ;


    }



    if (pos< -200 & pos>-300) {


    trans=150;


    itm. getProperties(). edit(). setInteger(‘i.alpha’,trans). commit() ;


    }



    if (pos< -300 & pos>-400) {


    trans=100;


    itm. getProperties(). edit(). setInteger(‘i.alpha’,trans). commit() ;


    }



    if (pos< -400 & pos>-500) {


    trans=50;


    itm. getProperties(). edit(). setInteger(‘i.alpha’,trans). commit() ;


    }

    ]]>

  8. Anonymous says:

    < ![CDATA[

    I think you should only commit if trans actually changes.


    I will try your script and give better feedback as soon as I can.

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Bogdan Tautu thank you bogdan. i have posted a video a few seconds ago.

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Bogdan Tautu i’ve changed the scipt. and save now the transparency in the itemTAG. and perform the chnages only when value differs from the one which shoul be set.



    same reuslt hooks and jumps ;-(

    ]]>

  11. Anonymous says:

    < ![CDATA[

    var desk = LL. getCurrentDesktop();



    var item = desk. getItemByLabel(“panel”);



    var pos = desk. getPositionX() + 1080;



    item.getProperties().edit().setInteger(“i.alpha”, pos/1080*255).commit();



    I used the above script and had no lagging or stop point problems like you had in the video. There must be some other things that are causing the issue.

    ]]>

  12. Anonymous says:

    < ![CDATA[

    Bogdan Tautu thank you bogdan. i will try it later and hope to find what problem might be.

    ]]>

  13. Anonymous says:

    < ![CDATA[

    Bogdan Tautu now it doesn’t hook, but it scrolls by itself much to fast. no chance to scroll back until it reached stoppoint.


    no smothness at all. i have deactivated all other stuff. after some tries llx crashes.


    🙁



    no good idea for llx.



    i use llx 10.3. android 4.2. oppo find 5.

    ]]>

  14. Anonymous says:

    < ![CDATA[

    I probably need your llx version to test…

    ]]>

  15. Anonymous says:

    < ![CDATA[

    Bogdan Tautu you don’t need to. It works now without this effect. Would be nicer with but i can live without it.

    ]]>

Leave a Reply

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