Generally as a rule of thumb if you need to modify the Mootools code your probably doing something wrong.
Slider doesn't have an onBeforeStart event. However the Drag class is wrapped by Slider. If I needed to get at that particular event I would mySlider = new Slider(...); mySlider.drag.addEvent('onBeforeStart', function(){...}); On Mon, May 4, 2009 at 2:51 PM, Leeb <lsb...@gmail.com> wrote: > > the onBeforeStart as far as I remember onBeforeStart is not a public > event. > and I don’t think you can register an event to catch it. > > my suggestion is not very elegant, but if you really need to catch > this event, you will > probably have to modify the mootools source code. > > I faced a similar issue, and I solve it by modify the mootools source > code. > > The slight disadvantage using this approach is in case you update > mootools version > You are likely to break you own application > > but this quick fix worked for me. its might as well work for you > > > > On May 1, 7:25 pm, mmjaeger <mmjae...@gmail.com> wrote: > > Hello > > I've set up a slider on my page like this: > > this.slider = new Slider($('slider-small-area'), $('knob'), { > > steps: this.pictures.length, > > onChange: function(pos){ > > dbug.log('onChange'); > > }.bind(this), > > onComplete: $empty > > }).set(0); > > > > what I need to know is how I could get the onBeforeStart event before > > I start dragging the knob - what I did is adding a mousedown event to > > the knob like this but I'm almost positive that there is a more > > elegant way to do it: > > > > $('knob').addEvent('mousedown', function(e){ > > e.stop(); > > this.stop(); > > }.bind(this)); > > > > Thank you in advance for your input. >