Board Logo

Jump_to
SimonC - 1/3/2006 at 01:29 PM

I am a new Scroller Pro user.
I want to be able to jump to a particular item in my scroller list. But I don't seem to be able to get the tscroll(0).jump_to() object to work.

This simple code in one of my pages:

<SCRIPT LANGUAGE="JavaScript">
var myscroll = new TScroll_init (Tscr_LOOK, Tscr_BEHAVE, Tscr_ITEMS);
myscroll.jump_to(3);
</SCRIPT>

gives me this error:

"Object expected"

If I remove the 'jumpo_to' line, the ticker functions just fine with no errors and 6 items in the scroll list (0-5).

Please advise. I have looked at the examples but can't figure out why they are different to the above. I have reviewed the documentation, but that doesn't help me either. PErhaps I am calling the jump_to function wrong somehow?

Thanks, Simon.


tigra - 1/3/2006 at 07:22 PM

it takes some time for the scroller items to initialize after you call the constructor. jump_to(..) method should only be called from event handler after the page is completely loaded. If you want scroller to load with items in alternative order you can shuffle them in the items array before feeding it to the scroller. See http://www.softcomplex.com/forum/viewthread_3221/ for example.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/