I've created a slider using Obelo's slider tutorial/script.
For iOS, on the simulator (I'm using LC 5.5.1 on Lion on a Mac) everything works fine. On a device (iPhone 4 running 5.1.1) there is an initial delay in getting the slider to do anything. It needs a bit of a 'stab' on the slider button to get it working, after that it works fine and the user can slide the slider side-to-side nice and smooth.
The 'stab' it needs is not really huge, but there is no 'stab' needed to get the 'unlock' slider moving on iOS and i should think an average user would think the app was broken because ordinare pressure and sliding action does not get the slider moving.
I haven't tried this on an Android device yet (and I want it working properly on Android as well as iOS). has anyone experienced anything similar?
This is the script of the slider 'thumb' image:
Code: Select all
on constrainRectangularInit
set the constrainRectangular of graphic "grc_blueFill" to the rect of graphic "grc_blueFill"--of graphic "grc_scrollerConstain"
set the constrainRectangular of graphic "grc_Thumb2" to the rect of graphic "grc_scrollerConstain"
end constrainRectangularInit
on constrainRectangularExit
switch the short name of the current card
case "cdDuration"
put sConvertNum into gDuration
break
case "cdInterest"
put sConvertNum into gInterest
break
end switch
end constrainRectangularExit
on constrainRectangularCallback
get distance(the loc of grc "grc_lineStart1", the loc of grc "grc_Thumb2")
put it into tConvertNum
# use this to move the fill
put (tConvertNum + 20) into tFillMove
set the width of graphic "grc_blueFill" to tFillMove
set the left of graphic "grc_blueFill" to the left of graphic "grc_scrollerConstain"
if the short name of this card is "cdDuration" then
put (tConvertNum / 2) into tConvertNum -- removed this line for this version of example
multiply tConvertNum by (gDuration2 / 100)
put round (tConvertNum) into tConvertNum
if tConvertNum < gDuration1 then put gDuration1 into tConvertNum
if tConvertNum > 1 then
put tConvertNum & " " & gPeriodTypePlural into field "fld_Return2"
else
put tConvertNum & " " & gPeriodTypeSingular into field "fld_Return2"
end if
else--if the short name of this card is "cdInterest"
put tConvertNum into tMinCheck
put gInterest2 - gInterest1 into tSpan
multiply tConvertNum by (tSpan / 100)
multiply tConvertNum by 0.5
put round (tConvertNum) into tConvertNum
add gInterest1 to tConvertNum
if tConvertNum < gInterest1 then put gInterest1 into tConvertNum
if tMinCheck = 1 then put gInterest1 into tConvertNum
put tConvertNum & "% APR" into field "fld_Return2"
end if
put tConvertNum into sConvertNum
put tFillMove into gBlueFillLength
end constrainRectangularCallback
Any ideas as to what I'm doing wrong or have forgotten to do?