-
The White Flame
(AS2) Scroller is having a bit of a drag issue...
Ok check out the SWF of this project in progress:
http://www.johncliffordtaylor.com/pat/test.html
If you play around with the volume scroll in the middle of the stage you will notice that while its MOSTLY working ok it’s not too hard to make it kind of mess up and when you move the mouse off the scroll the bar follow the mouse well outside the range of the scrolled. Here is the action script attached to the scroll bar guys:
The MovieClip that holds the slider elements is instance named to: slider
The MovieClip that holds the small bar on the slider is instance named to: control
Code:
slider.control.onPress = function() {
startDrag(this, false, this._x, -100, this._x, 0);
}
slider.control.onRelease = function() {
stopDrag();
}
Thx for looking it over and helping out
oneLove
JT
Last edited by JohnyT9760; 07-10-2008 at 02:31 AM.
-
[Horse Thief]
I may be having a bit of trouble understanding exactly what your issue is. Is it that sometimes when you release & move your mouse away, the dragger acts as though it's still being dragged? If so, then that can probably be fixed by modifying the line :
Code:
slider.control.onRelease = function() {
stopDrag();
}
To say:
Code:
slider.control.onRelease = slider.control.onReleaseOutside = slider.control.onDragOut = function() {
slider.control.stopDrag();
}
The reason is that onRelease only counts if you're actually ON the element in question. onReleaseOutside makes it so that it fires wherever you release & you don't need to be actually ON the element. You may want to consider not using the slider.control.onDragOut because if the user drags from 0 to 100 really fast, as soon as their mouse leaves the slider it will stop dragging - this may cause the user to have to drag the slider really slowly - I put this in there "just in case", but the onReleaseOutside is probably all you need.
If this isn't what you were asking about, then please correct me.
1 Infinite Loop, Cupertino is a portal of Hell.
-
The White Flame
Worked like a charm!
Thx crash your the man! The new Test file is up and posted at:
http://www.johncliffordtaylor.com/pat/test.html
The actule code I need up using was:
Code:
slider.control.onRelease = slider.control.onReleaseOutside=function ()
{
slider.control.stopDrag();
}
Thx 4 the assist buddy
John
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|