Hi i m just a new user learning to use the script to create some simple effect
(i swype on the desktop, the shortcuts and widget from the right hand side of the screen getting in and increase the transparency from 0 to 255,so it looks like fading in from RHS)
i m fine with the shortcut i used the follow script or called api
but i failed to do the same thing on the widget
var d = LL.getCurrentDesktop();
var x = d.getPositionX();
var i = d.getItemByName(“Timetable”);
var i2 = d.getItemByName(“calendar”);
var a = x/1335*255;
/1335 is my horizontal screen width/
i.getProperties().edit().setInteger(“i.alpha”,a).commit();
i tried the same api by replacing i to i2
i2.getProperties().edit().setInteger(“i2.alpha”,a).commit();
it throws me an error
i think this is because of i2 a widget but i is a shortcut
any idea or suggestion on the modification?
sorry for my bad english
many thanks
]]>
< ![CDATA[
You replaced i.alpha with i2.alpha in setInteger(). But the i here is not your var. It’s a shortcut for item.
]]>
< ![CDATA[
Thanks, i also figure it out myself.
]]>