Scrolling Group
Posted: Mon Aug 24, 2015 3:26 am
Not exactly sure what is causing this issue, but I'm trying to use the standard method of creating a scrolling group by using the mousedown and mouseup handlers on a group. I tried setting this on a stack level command worked for the horizontal, but it isn't actually scrolling, its just moving an object. Regardless, I moved it down to the group level to see if I could get a better response. No dice. I tested the commands and it seems that my mousedown handler is received by the group ( showing up a true value in a test field for that handler ). However, the mouseUP handler only is received when it is on a few specific objects within that group (none of which actually have scripts) and it is only returned whenever the mouseDown and mouseUp handlers are received by the same object. I'm not exactly sure what might be causing this issue. I'm sure it's just something that I am overlooking, but I can't seem to figure it out.
What I am creating:
Essentially I have a group of objects displaying information about a given object but it displays a larger array of data than can fit on the screen so I need the group to be able to scroll down and up to access the information.
Code (wherever there is a put something into field "test1" that is just a validation that the command is being run) The breakdown starts at the On MouseUp:
global sStartH, sStartV
on mouseDown
put the mouseV into sStartV
put "mousedown" into field "test1"
end mouseDown
on mouseUp
put "mouseUp" into field "test1"
if abs(the mouseV - sStartV) > 100 then
if the mouseV - sStartV >0 then
put "true" into field "test1"
else if the mouseV - sStartV <0 then
put "truedown" into field "test1"
end if
end if
put "mouseUp4" into field "test1"
end mouseUp
on swipedown
put the mouseV - sStartV into SwipeDownDist
set the vScroll of grp "Scroll_group id 5263" to SwipeDownDist
put "true" into field "test1"
end swipedown
on swipeUp
put the mouseV - sStartV into SwipeUpDist
set the vScroll of grp "Scroll_group id 5263" to SwipeUpDist
put "true" into field "test1"
end swipeUp
What I am creating:
Essentially I have a group of objects displaying information about a given object but it displays a larger array of data than can fit on the screen so I need the group to be able to scroll down and up to access the information.
Code (wherever there is a put something into field "test1" that is just a validation that the command is being run) The breakdown starts at the On MouseUp:
global sStartH, sStartV
on mouseDown
put the mouseV into sStartV
put "mousedown" into field "test1"
end mouseDown
on mouseUp
put "mouseUp" into field "test1"
if abs(the mouseV - sStartV) > 100 then
if the mouseV - sStartV >0 then
put "true" into field "test1"
else if the mouseV - sStartV <0 then
put "truedown" into field "test1"
end if
end if
put "mouseUp4" into field "test1"
end mouseUp
on swipedown
put the mouseV - sStartV into SwipeDownDist
set the vScroll of grp "Scroll_group id 5263" to SwipeDownDist
put "true" into field "test1"
end swipedown
on swipeUp
put the mouseV - sStartV into SwipeUpDist
set the vScroll of grp "Scroll_group id 5263" to SwipeUpDist
put "true" into field "test1"
end swipeUp