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

  1. property ancestor, myOnUpstate, myOnRollstate, myOnDnstate, myOnOff
  2.  
  3. on new me, sS
  4.   set the ancestor of me to new(script "btnParentScript", sS)
  5.   set the myOnUpstate of me to the memberNum of sprite sS + 3
  6.   set the myOnRollstate of me to the memberNum of sprite sS + 4
  7.   set the myOnDnstate of me to the memberNum of sprite sS + 5
  8.   set the myOnOff of me to 0
  9.   return me
  10. end
  11.  
  12. on doRoll me
  13.   if (the mouseCast = the myUpState of me) and rollOver(the myS of me) then
  14.     set the memberNum of sprite the myS of me to the myRollState of me
  15.   else
  16.     if (the mouseCast = the myOnUpstate of me) and rollOver(the myS of me) then
  17.       set the memberNum of sprite the myS of me to the myOnRollstate of me
  18.     else
  19.       if (the mouseCast = the myRollState of me) and rollOver(the myS of me) then
  20.       else
  21.         if (the mouseCast = the myOnRollstate of me) and rollOver(the myS of me) then
  22.         else
  23.           if the myOnOff of me = 0 then
  24.             set the memberNum of sprite the myS of me to the myUpState of me
  25.           else
  26.             set the memberNum of sprite the myS of me to the myOnUpstate of me
  27.           end if
  28.         end if
  29.       end if
  30.     end if
  31.   end if
  32. end
  33.  
  34. on button me
  35.   set whichSprite to the myS of me
  36.   set actNow to 0
  37.   set dnClick to "click1"
  38.   set upClick to "click2"
  39.   set playedClick to 1
  40.   repeat while the stillDown
  41.     if rollOver(whichSprite) then
  42.       if playedClick = 1 then
  43.         puppetSound(dnClick)
  44.         set playedClick to 0
  45.         set the memberNum of sprite whichSprite to the myDnState of me
  46.         set actNow to 1
  47.       end if
  48.     else
  49.       if playedClick = 0 then
  50.         puppetSound(upClick)
  51.         set playedClick to 1
  52.         set the memberNum of sprite whichSprite to the myUpState of me
  53.         set actNow to 0
  54.       end if
  55.     end if
  56.     updateStage()
  57.   end repeat
  58.   if actNow = 1 then
  59.     set the myOnOff of me to not (the myOnOff of me)
  60.     if the myOnOff of me then
  61.       set the memberNum of sprite the myS of me to the myOnUpstate of me
  62.     else
  63.       set the memberNum of sprite the myS of me to the myUpState of me
  64.     end if
  65.     puppetSound(upClick)
  66.     do(the myHandler of me)
  67.   end if
  68. end
  69.  
  70. on displayTopicText whichTopic
  71.   set topicTextS to 11
  72.   puppetSprite(topicTextS, 1)
  73.   set the memberNum of sprite topicTextS to the number of member ("topic." & whichTopic)
  74.   set the scrollTop of member the memberNum of sprite topicTextS to 0
  75. end
  76.  
  77. on QTstartStop movieS
  78.   if the memberNum of sprite movieS then
  79.     if the type of member the memberNum of sprite movieS = #digitalVideo then
  80.       set the movieRate of sprite movieS to not (the movieRate of sprite movieS)
  81.     end if
  82.   end if
  83. end
  84.