scrolling in bpatcher

May 17, 2009 at 8:25pm

scrolling in bpatcher

Hi I´m quite a newbie to javascript,So please bare with me.
There is probably a very simple answer on how to do this but I can´t seem to get my head around it..
I need to control the v.scrolling in a bpatcher (in presentation mode) the bpatcher object have the attribute “Enable vertical scrollbar”enabled.(for showing the v.scroll) It scrolls in my main patch, but not in the bpatcher. I use the following script:

autowatch = 1;
inlets = 1;

function msg_int(a)
{
if (inlet == 0)
{
this.patcher.wind.scrollto(0,a);
}
}

I know the bpatcher argument is box, but I can´t get this to work either or how do I apply it?
I´ve attached a test patch, with bpatcher and script for explaining what I´m trying to do.
Does someone has a solution or idea for me?
Any help is much appreciated!

#43966
May 17, 2009 at 8:32pm

You should be able to do this with the “offset” attribute to [bpatcher] instead of using wind.scrollto() in a javascript.

lh

#157926
May 18, 2009 at 8:06am

Hello,

if you absolutely want to use javascript ?!

#157927
May 18, 2009 at 9:45am

Thank you both!
the offset atttribute, of course I overlooked that one..

#157928

You must be logged in to reply to this topic.