home *** CD-ROM | disk | FTP | other *** search
/ Corrections in America -…uction (Student Resource) / Allen.iso / pc / content / mpage.dxr / 00005_PrevNextModulePage.ls < prev    next >
Encoding:
Text File  |  2005-12-16  |  936 b   |  39 lines

  1. property pButtonFunction
  2. global gMovieProperties, gModuleProperties
  3.  
  4. on getPropertyDescriptionList me
  5.   return [#pButtonFunction: [#comment: "'previous' or 'next' depending on what you want the button to do.", #format: #string, #default: EMPTY]]
  6. end
  7.  
  8. on new me, bFunction
  9.   me.pButtonFunction = bFunction
  10.   return me
  11. end
  12.  
  13. on mouseWithin me
  14.   sprite(the currentSpriteNum).cursor = 280
  15.   SwitchButtonState("over")
  16. end
  17.  
  18. on mouseLeave me
  19.   sprite(the currentSpriteNum).cursor = 0
  20.   SwitchButtonState("up")
  21. end
  22.  
  23. on mouseDown me
  24.   gModuleProperties.UpdatePagesList()
  25.   if pButtonFunction = "next" then
  26.     gModuleProperties.pCurrentPage = gModuleProperties.pCurrentPage + 1
  27.   else
  28.     if pButtonFunction = "previous" then
  29.       gModuleProperties.pCurrentPage = gModuleProperties.pCurrentPage - 1
  30.     end if
  31.   end if
  32.   gMovieProperties.StartPageSetup()
  33.   if the frame mod 2 then
  34.     go(the frame + 1)
  35.   else
  36.     go(the frame - 1)
  37.   end if
  38. end
  39.