Well, now.
I have updated the Scroll widget..
Yes. Again.
The widget behaves a little differently now.
With the old widget (D1 and prev D2) you had to add your own event listener
to respond to the scroll event.
Now you don't.
:-)
If you look at the attached demo you will notice the lack of an event
listener in the .htm file,
as well as two new function calls:
VScroll.bindLayer(myPanel);
HScroll.bindLayer(myPanel);
Here's how Bindlayer works..
It assigns an internal reference to the 'bound' layer
(only one layer can be bound at the moment)
then take the layers current X or Y (depending on orientation)
and stores that as
this.boundLayerOrigion
Which is used as the 'default' position of the layer.
so.. here's how it works.
Create and position your scroll bar.
Create a position you Layer to be scrolled
Bind the layer to the scrollabr,
and bang, you have a scrolling layer..
Now that this has been implemented, I will do the dynamic scroll knob sizing
and the continuous scrolling
(keep scrolling while mouse is down on button)
Doug
P.S. Please test:
http://206.75.45.190/myscroll.htm
---
Outgoing mail is certified Virus Free by AVG Free Edition
Download at: http://www.grisoft.com/html/us_index.cfm
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01
|