home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / winprogs / childenc / oecdemo / shared.dir / 00549.ls < prev    next >
Encoding:
Text File  |  1996-07-24  |  698 b   |  24 lines

  1. on showPopMenu cast1, castRange
  2.   global castData, rectList
  3.   set rectList to []
  4.   set theRect to item 1 of castData
  5.   repeat with n = 1 to 4
  6.     set x to offset("┬╢", theRect)
  7.     if x > 0 then
  8.       addAt(rectList, n, char 1 to x - 1 of theRect)
  9.       delete char 1 to x of theRect
  10.       next repeat
  11.     end if
  12.     addAt(rectList, n, theRect)
  13.   end repeat
  14.   set popMenuPtr to value(item 4 of castData)
  15.   puppetSprite(6, 1)
  16.   set the ink of sprite 6 to 32
  17.   set the castNum of sprite 6 to popMenuPtr
  18.   set x1 to value(getAt(rectList, 1))
  19.   set y1 to value(getAt(rectList, 2))
  20.   set x2 to x1 + value(getAt(rectList, 3))
  21.   set y2 to y1 + value(getAt(rectList, 4))
  22.   spriteBox(6, x1, y1, x2, y2)
  23. end
  24.