...

View Full Version : How to make this in JS?



gringojuan
09-26-2005, 04:08 PM
Hi, can anyone help me how to do this effect?

http://www.pavr.cz/2005/america04/048/48.html

roll the page horizontally to the end and click the "/<<</ zpet" link on the bottom right. the whole page scrolls back.

it has been done using the Adobe GoLive elements but I am trying to do the same effect in JS while keeping it valid.

I appreciate any help.

juan

rm-f
09-26-2005, 08:17 PM
onclick="CSAction(new Array(/*CMP*/'scrolling'));return CSClickReturn();
...
CSAct[/*CMP*/ 'scrolling'] = new Array(CSScrollLeft,12000,100);// -->
...

function CSScrollLeft(action){
if(navigator.appVersion.charAt(0) >=4) {
var container = 0
if (action[2] > 0) {
while (container < action[1]) {
window.scrollBy(-action[2],0);
container = container + action[2];
}
}
}
}


and for window.scrollBy():
http://www.mozilla.org/docs/dom/domref/dom_window_ref106.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum