home *** CD-ROM | disk | FTP | other *** search
/ Comic Book Maker: The Smurfs / COMIC.iso / mac / data_m / dialog / 00036_initOpenDialogBhvr.ls < prev    next >
Encoding:
Text File  |  1999-07-07  |  1.7 KB  |  46 lines

  1. property myParams
  2. global gObj5
  3.  
  4. on beginSprite me
  5.   set adjustOffset to 15 + the height of the member of sprite 10 + 10
  6.   set bugFix to the left of sprite 2
  7.   set myRect to the rect of sprite 2 + [0, 0, 0, adjustOffset]
  8.   set the rect of sprite 2 to myRect
  9.   repeat with i = 1 to 17
  10.     if not getOne([2, 13, 15, 10], i) then
  11.       set the locV of sprite i to the locV of sprite i + adjustOffset
  12.     end if
  13.   end repeat
  14.   set offsetPoint to point(getAt(the rect of the stage, 1) + ((640 - the width of myRect) / 2), getAt(the rect of the stage, 2) + ((480 - the height of myRect) / 2))
  15.   checkBtnLocations(the bottom of myRect)
  16.   set theRect to myRect + rect(offsetPoint, offsetPoint)
  17.   if not (the moreThanMax of sprite(12)) then
  18.     disable(sprite(14))
  19.     disable(sprite(16))
  20.     disable(sprite(17))
  21.   end if
  22.   if the maxLines of sprite(12) = 0 then
  23.     disable(sprite(4))
  24.   else
  25.     set theActiveLine to min(the pLastDirectorySelection of gObj5, the maxLines of sprite(12))
  26.     set the myParams of sprite(4) to theActiveLine
  27.     set the activeLine of sprite(12) to theActiveLine
  28.     if theActiveLine > 10 then
  29.       set the scrollTopValue of sprite(12) to (theActiveLine * 15) - 150
  30.     else
  31.       set the scrollTopValue of sprite(12) to 0
  32.     end if
  33.     set the scrollTop of member "directoryIndex" to the scrollTopValue of sprite(12)
  34.     updateHilite(sprite(12))
  35.     updateIndicator(sprite(12), 1)
  36.   end if
  37.   set the keyDownScript to "processKey(sprite 12, the key)"
  38.   set the rect of the activeWindow to theRect
  39.   set the modal of the activeWindow to 1
  40.   set the visible of the activeWindow to 1
  41. end
  42.  
  43. on getPropertyDescriptionList
  44.   return [#myParams: [#comment: "Params:", #format: #integer, #default: VOID]]
  45. end
  46.