This is a universal copy&paste binding to easy set up.
This is a universal copy&paste binding to easy set up.
It allows you to make easily (basic binding knowledge required, this is a help tool) a binding outputting a number between two values based on a 0/1 variable.
Use this with the easy toggle
1-$variable
Features:
Easy to set variable to use
Custom initial/final values
Custom duration of all animation steps (offset, duration…)
Custom animation type
Optional autoback feature (will automatically play back on each change, like a spring)
]]>« How do I make a folder back ground transparent? (Previous Post)
(Next Post) For tablet in car (peugeot) »
< ![CDATA[
var variable=”$toggle”;//name of the variable to use. Must have a +-1 change step or will play oddly
var initial=0;//maximum value of the property
var final=1;//minimum value of the property
var autoback=false;//if you want it to toggle back again, Boolean
var offset=0;//time to wait until the animation start, in milliseconds
var duration=250;//duration of the animation, in milliseconds
var wait=250;//time to wait between the animation and the back animation (if autoback is true)
var backduration=250;//duration of the back animation (if autoback is true)
var interpolator=”ad”;//see below
var backinterpolator=”ad”;//see below (if autoback is true)
/* one of:
“li” : linear
“ac” : accelerate
“de” : decelerate
“ad” : accelerate / decelerate
“an” : anticipate
“ov” : overshoot
“bo” : bounce
*/
//for more information check http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=bindings
//script start. Don’t modify anything below unless you know what you are doing
var value=animate(variable,duration, interpolator,offset);
if(autoback)value=Math.abs(value-animate(variable,backduration,backinterpolator,offset+duration+wait));
return value*(final-initial)+initial;
]]>
< ![CDATA[
This is great. Thanks again
]]>