home *** CD-ROM | disk | FTP | other *** search
/ George of the Jungle Press Kit / GEORGE.iso / pc / george.dxr / Internal_893_radioBtnParentScript.ls < prev    next >
Encoding:
Text File  |  1997-06-23  |  1.3 KB  |  52 lines

  1. property ancestor
  2. global gRadioBtn
  3.  
  4. on new me, sS
  5.   set the ancestor of me to new(script "btnParentScript", sS)
  6.   set gRadioBtn to 0
  7.   return me
  8. end
  9.  
  10. on button me
  11.   set whichSprite to the myS of me
  12.   set actNow to 0
  13.   set dnClick to "click1"
  14.   set upClick to "click2"
  15.   set playedClick to 1
  16.   repeat while the stillDown
  17.     if rollOver(whichSprite) then
  18.       if playedClick = 1 then
  19.         puppetSound(dnClick)
  20.         set playedClick to 0
  21.         set the memberNum of sprite whichSprite to the myDnState of me
  22.         set actNow to 1
  23.       end if
  24.     else
  25.       if playedClick = 0 then
  26.         puppetSound(upClick)
  27.         set playedClick to 1
  28.         set the memberNum of sprite whichSprite to the myUpState of me
  29.         set actNow to 0
  30.       end if
  31.     end if
  32.     updateStage()
  33.   end repeat
  34.   if actNow = 1 then
  35.     if objectp(gRadioBtn) then
  36.       set the memberNum of sprite the myS of gRadioBtn to the myUpState of gRadioBtn
  37.       puppetSound("poit")
  38.     else
  39.       puppetSound(upClick)
  40.     end if
  41.     set gRadioBtn to me
  42.     do(the myHandler of me)
  43.   end if
  44. end
  45.  
  46. on displayTopicText whichTopic
  47.   set topicTextS to 6
  48.   puppetSprite(topicTextS, 1)
  49.   set the memberNum of sprite topicTextS to the number of member ("topic." & whichTopic)
  50.   set the scrollTop of member the memberNum of sprite 6 to 0
  51. end
  52.