gotoHpage and gotoVPage
Scrolling to pages within a container (e.g. Desktop)
Quick&Dirty Scripts i made cause of this:
https://plus.google.com/u/0/+gerdreuter/posts/cJhWmwo7GnS
use it like this:
LL.runScript(‘gotoHpage’,’-1′)
scrolls to the 1st page left from “homepage”
LL.runScript(‘gotoVpage’,2′)
scrolls to the 2nd page underneath from “homepage”.
The Scripts:
————————————————————————————–
// gotoHpage
// scroll to horizontal Page
// parameter is page relative to Homepage (0)
// leave vertical position as it is.
var gotoPage=LL.getEvent().getData();
var cont=LL. getEvent(). getContainer() ;
var width=cont.getWidth(); // ContainerWidth
var height=cont.getHeight(); // ContainerHeight
var pX=cont. getPositionX(); // Position X Left
var pY=cont. getPositionY(); // Position Y Top
cont.setPosition(gotoPage*width, pY);
————————————————————————————–
// gotoVpage(page)
// scroll to Vertical Page
// parameter is page relative to Homepage (0)
// leave horizontal position as it is.
var gotoPage=LL.getEvent().getData();
var cont=LL. getEvent(). getContainer() ;
var width=cont.getWidth(); // ContainerWidth
var height=cont.getHeight(); // ContainerHeight
var pX=cont. getPositionX(); // Position X Left
var pY=cont. getPositionY(); // Position Y Top
cont.setPosition(pX,gotoPage*height);
]]>
< ![CDATA[
I like it!
]]>
< ![CDATA[
Ren Shore thank you ren. me too 😀
]]>