home *** CD-ROM | disk | FTP | other *** search
/ PC Master 1997 July & August / PCM97.iso / demos.dxr / 00020.ls < prev    next >
Encoding:
Text File  |  1998-06-23  |  1.5 KB  |  55 lines

  1. on select btn
  2.   global nm, pth, dscr, inst, rn, rpath, ipath, isvideo, tpth, xfile, xf
  3.   repeat with i = 55 to 70
  4.     set the visible of sprite i to 0
  5.   end repeat
  6.   set the visible of sprite (btn + 25) to 1
  7.   puppetSprite(10, 1)
  8.   puppetSprite(11, 1)
  9.   puppetSprite(12, 1)
  10.   puppetSprite(13, 1)
  11.   set the locH of sprite 13 to 2000
  12.   set isvideo to 0
  13.   set a to the name of member the member of sprite btn
  14.   set the text of member "description" to getAt(dscr, value(a))
  15.   set xf to getAt(xfile, value(a))
  16.   set tpth to "demos" & getAt(pth, value(a)) & "\"
  17.   set ipath to getAt(inst, value(a))
  18.   if ipath > EMPTY then
  19.     set ipath to tpth & ipath
  20.     set the member of sprite 10 to "inst2"
  21.   else
  22.     set the member of sprite 10 to "g-inst2"
  23.   end if
  24.   if xf > EMPTY then
  25.     set the member of sprite 12 to "info2"
  26.   else
  27.     set the member of sprite 12 to "g-info2"
  28.   end if
  29.   set rpath to getAt(rn, value(a))
  30.   if rpath > EMPTY then
  31.     set rpath to tpth & rpath
  32.     set the member of sprite 11 to "run2"
  33.     if chars(rpath, length(rpath) - 2, length(rpath)) = "avi" then
  34.       set isvideo to 1
  35.       puppetSprite(4, 1)
  36.       set the member of sprite 4 to "v" & a
  37.       set the visible of sprite 4 to 1
  38.       updateStage()
  39.     else
  40.       set the visible of sprite 4 to 0
  41.       set isvideo to 0
  42.     end if
  43.   else
  44.     set the visible of sprite 4 to 0
  45.     set the member of sprite 11 to "g-run2"
  46.   end if
  47.   if value(a) < 17 then
  48.     set the member of sprite 6 to "i" & a
  49.     set the visible of sprite 6 to 1
  50.   else
  51.     set the visible of sprite 6 to 0
  52.   end if
  53.   updateStage()
  54. end
  55.