
trying to drag an image in the horizontal pane
Hello, my first post.
I have a new widget and I want to click on a visual element (a hand-made slider) and then slide it only in the horizontal plane within two boundaries.
I have used onMouseDown and system.event.hOffset to move it and that has been successful to a certain extent. However, it only moves the slider at the point at which the mouse button is depressed. It won't keep on dragging. I want to be able to keep dragging the slider according to the current mouse position with the mouse button pressed - a normal drag. I have found the yahoo documentation obscure and confusing and I'm looking ofr help only after a lot of digging.
I am using the current version of Yahoo widgets. I have no sample code as I just deleted the whole function after giving up... the XML is simply:
<image>
<name>sliderSet</name>
<src>Resources/sliderSet.png</src>
<hOffset>35</hOffset>
<vOffset>147</vOffset>
<onMultiClick> <![CDATA[
<onMouseDown> <![CDATA[
slidermove();
// ]]> </onMouseDown>
</image>
I believe the code to do this very simple I am just completely unacquainted with Javascript syntax and really need your help!
FYI - an image of the widget is here in an earlier form, at least you can see the slider
An early version of the widget can be seen here:
feel free to try a download - it does not do much