home *** CD-ROM | disk | FTP | other *** search
- property pRadioCount, pCurrentRadio, pRadioCasts
- global gGeneralSetting
-
- on birth me, buttonChannels, defaultRadioButtonNum
- set the pRadioCount of me to count(buttonChannels)
- set the pRadioCasts of me to []
- repeat with theChannel in buttonChannels
- add(the pRadioCasts of me, the castNum of sprite theChannel)
- end repeat
- mSetRadio(me, defaultRadioButtonNum)
- return me
- end
-
- on mSetRadio me, whichButton
- repeat with theCast = 1 to the pRadioCount of me
- set the hilite of cast getAt(the pRadioCasts of me, theCast) to 0
- end repeat
- set the hilite of cast getAt(the pRadioCasts of me, whichButton) to 1
- set the pCurrentRadio of me to whichButton
- set gGeneralSetting to getAt([1: #once, 2: #nTimes, 3: #forever], the pCurrentRadio of me)
- end
-