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

  1. property myUpState, myRollState, myDnState, myS, myHandler
  2. global gFlashState
  3.  
  4. on new me, s
  5.   set myS to s
  6.   set myHandler to the name of member the memberNum of sprite s
  7.   delete word 1 of myHandler
  8.   set myUpState to the memberNum of sprite s
  9.   set myRollState to myUpState + 1
  10.   set myDnState to myRollState + 1
  11.   return me
  12. end
  13.  
  14. on doRoll me
  15.   if the mouseCast = myUpState then
  16.     set the memberNum of sprite myS to myRollState
  17.   else
  18.     if the mouseCast = myRollState then
  19.     else
  20.       set the memberNum of sprite myS to myUpState
  21.     end if
  22.   end if
  23. end
  24.  
  25. on doRollAnim me
  26.   global gFlashState
  27.   if the mouseCast = myUpState then
  28.     set the memberNum of sprite myS to myRollState
  29.     set gFlashState to 1
  30.   else
  31.     if the mouseCast = myRollState then
  32.     else
  33.       set the memberNum of sprite myS to myUpState
  34.     end if
  35.   end if
  36. end
  37.  
  38. on button me
  39.   set whichSprite to myS
  40.   set actNow to 0
  41.   set dnClick to "click1"
  42.   set upClick to "click2"
  43.   set playedClick to 1
  44.   set gFlashState to 1
  45.   repeat while the stillDown
  46.     if rollOver(whichSprite) then
  47.       if playedClick = 1 then
  48.         puppetSound(1, dnClick)
  49.         set playedClick to 0
  50.         set the memberNum of sprite whichSprite to myDnState
  51.         set actNow to 1
  52.       end if
  53.     else
  54.       if playedClick = 0 then
  55.         puppetSound(1, upClick)
  56.         set playedClick to 1
  57.         set the memberNum of sprite whichSprite to myUpState
  58.         set actNow to 0
  59.       end if
  60.     end if
  61.     updateStage()
  62.   end repeat
  63.   if the memberNum of sprite whichSprite = myDnState then
  64.     set the memberNum of sprite whichSprite to myUpState
  65.     puppetSound(1, upClick)
  66.     updateStage()
  67.   end if
  68.   repeat while soundBusy(1)
  69.   end repeat
  70.   sound stop 1
  71.   if actNow = 1 then
  72.     do(myHandler)
  73.   end if
  74. end
  75.  
  76. on goFrame whichFrame
  77.   global gCurrentFrame
  78.   if the memberNum of sprite 6 > 0 then
  79.     if the type of member the memberNum of sprite 6 = #digitalVideo then
  80.       if not (the puppet of sprite 6) then
  81.         puppetSprite(6, 1)
  82.       end if
  83.       put gCurrentFrame
  84.       if (gCurrentFrame = "MC") or (gCurrentFrame = "Making of") or (gCurrentFrame = "Movie clips") then
  85.         set the memberNum of sprite 6 to the number of member "matte left"
  86.       else
  87.         set the memberNum of sprite 6 to the number of member "matte center"
  88.       end if
  89.       set the loc of sprite 6 to point(320, 240)
  90.       updateStage()
  91.     end if
  92.   end if
  93.   init(1, 48, 0, 0)
  94.   go(whichFrame)
  95. end
  96.  
  97. on goSubFrame whichFrame
  98.   global gCurrentFrame
  99.   if (whichFrame = "Pic") or (whichFrame = "Bio") then
  100.     if not (the puppet of sprite 6) then
  101.       puppetSprite(6, 1)
  102.     end if
  103.     set the memberNum of sprite 6 to the number of member "matte"
  104.     set the loc of sprite 6 to point(320, 240)
  105.   end if
  106.   init(1, 48, 0, 0)
  107.   go(gCurrentFrame && whichFrame)
  108. end
  109.  
  110. on goBack
  111.   global gCurrentFrame
  112.   init(1, 48, 0, 0)
  113.   go("CastAnimDone")
  114. end
  115.  
  116. on goBackInt
  117.   global gCurrentFrame
  118.   if not (the puppet of sprite 6) then
  119.     puppetSprite(6, 1)
  120.   end if
  121.   set the memberNum of sprite 6 to the number of member "matte"
  122.   set the loc of sprite 6 to point(320, 240)
  123.   updateStage()
  124.   init(1, 48, 0, 0)
  125.   go(gCurrentFrame && "Int")
  126. end
  127.  
  128. on goBackPro
  129.   global gCurrentFrame
  130.   init(1, 48, 0, 0)
  131.   go("ProAnimDone")
  132. end
  133.  
  134. on goBackPrint
  135.   global gCurrentFrame
  136.   init(1, 48, 0, 0)
  137.   go(gCurrentFrame && "Pic")
  138. end
  139.