home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Webster's Millennium Amer…Sign Language Dictionary
/
ASL.ISO
/
mac
/
SKILLS.dir
/
00070_Script_70
< prev
next >
Wrap
Text File
|
2001-09-05
|
2KB
|
57 lines
on setBtn2 pos
global TEMPLATE1, KNOB1, minPos1, maxPos1,gNumQs
global maxScroll,minScroll,gCat,scrollList
put maxscroll*1.0-minScroll*1.0 into scrollRange
put float(scrollRange/(maxPos1-minPos1)) into scrollRatio
put max(integer((maxPos1-minPos1)/scrollRange),1) into sliderRatio
set the locH of sprite KNOB1 = minPos1 --+ integer(sliderRatio*(pos-1))
set refVal = getQVal(the locH of sprite KNOB1,scrollRange,scrollRatio,minPos1)
set the text of cast "whichq" = string(integer(refVal))&&"of"&&gNumQs
updatestage
set refVal = getQVal(the locH of sprite KNOB1,scrollRange,scrollRatio,minPos1)
aQuestion 1
end setBtn2
on buttonDown1
global TEMPLATE1, KNOB1, minPos1, maxPos1,gNumQs
global maxScroll,minScroll,gCat,scrollList
put maxscroll*1.0-minScroll*1.0 into scrollRange
put scrollRange/(maxPos1-minPos1) into scrollRatio
set oldMouseH = the mouseH
repeat while the stillDown
if oldMouseH <> the mouseH then
set the locH of sprite KNOB1 = max( minPos1, min( ( the mouseH ) , maxPos1 ) )
set refVal = getQVal(the locH of sprite KNOB1,scrollRange,scrollRatio,minPos1)
set the text of cast "whichq" = string(integer(refVal))&&"of"&&gNumQs
updateStage
set oldMouseH = the mouseH
end if
end repeat
aQuestion refVal
end buttonDown1
on getQVal locRef,scrollRange,scrollRatio,TheLeft
global maxScroll,minScroll
return minScroll+((locRef)-TheLeft)*scrollRatio
end getQVal
on setWord locRef,scrollRange,scrollRatio,TheLeft
global scrollList
global maxScroll,minScroll
put ((locRef)-TheLeft)*scrollRatio into scrollLoc
put minScroll+scrollLoc into refVal
--ïïïput "minScroll-"&minScroll&&"scrollLoc-"&scrollLoc&&"refVal-"&refVal
set the text of cast "word name" to line refVal of scrollList --cstName
set the text of cast "word" to line refVal of scrollList --cstName
--ïïïput line refVal of scrollList
set tempStr = string(integer(scrollLoc)+1)&"/"&string(integer(scrollrange)+1)
set the text of cast "word #" to tempStr
return line refVal of scrollList
end