Hi All

Hi All, 

Can anyone good with the scripting help me out (not too much as i’m trying to learn – lol). 

But in short I want a horizontal panel that will move up and down the screen following your finger as if it was pulled. 

So far I have the following which is both broken and won’t do what I want even if it did work.  Horray!

Self.SetPosition(0,500);

var y = self.getPositionY();

Andriod.makeNewToast(y,true).show();

So i guess i’m probably using self incorrectly. I would try using a var set to getItemById()  and then try and use it to set the position, but am not sure how to find out the ID of my container. 

I also have no idea how to get the Y position of the last coordinates. I have looked through the API guide but am a little lost. 

Any help appreciated!

]]>

5 Commentsto Hi All

  1. Anonymous says:

    < ![CDATA[

    Saw a comment from TrianguloY’s post. 



    getting a bit closer although with this i get an id of -1!



    var event = LL.getEvent();


    var con = event.getContainer();


    var goodGodDam = “var panel_id = ” + con.getId();


    prompt (“con id”, goodGodDam);



    the script is called on a blank panel with the “Swipe Down”. 

    ]]>

  2. Anonymous says:

    < ![CDATA[

    ok after much more reading through the API



    Sweet Sweet Progress. Needed to detach from grid ! Doh!



     I thought i should look like this:



    //set up


    var panel_label=”myLabel”;



    //get my stuff


    var d=LL.getCurrentDesktop();


    var p=d.getItemByLabel(panel_label);


    var e=LL.getEvent();


    var ey=e.getTouchScreenY();



    // do work


    p.setPosition(0,ey); // if i set this to something like 500 it works!



    Now i’m just getting one error on this last line. java.lang.NullPointerException,



    I guess i’m not using getTouchScreenY() the right way?

    ]]>

  3. Anonymous says:

    < ![CDATA[

    lmfao var goodGodDam Good one bro

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Hum, the java.lang.NullPointerException is a bug in LL, not in your script 😉


    On which event are you running this script ? I think the context may not be suitable to use getTouchScreenY

    ]]>

  5. Anonymous says:

    < ![CDATA[

    On a panel with the swipe down. I’ll try some others.

    ]]>

Leave a Reply

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