home *** CD-ROM | disk | FTP | other *** search
/ MacFormat UK 160 - Disc 1 / MF_UK_160_1.iso / pc / Files / Scenes / HOME.DIR / Internal_5_showmyname.ls < prev    next >
Encoding:
Text File  |  2005-08-01  |  1.5 KB  |  52 lines

  1. property Sp, myPath, menuTree
  2. global bHeight, bWidth, gRootPath, dv, ActiveSection, gActionPath
  3.  
  4. on beginSprite me
  5.   Sp = sprite(me.spriteNum)
  6.   menuTree = member("menutree")
  7. end
  8.  
  9. on mouseEnter me
  10.   cursor(280)
  11.   sprite(me.spriteNum).member.color = rgb(0, 120, 180)
  12. end
  13.  
  14. on mouseLeave me
  15.   cursor(-1)
  16.   sprite(me.spriteNum).member.color = rgb(0, 0, 0)
  17.   sprite(2).visible = 0
  18. end
  19.  
  20. on mouseUp me
  21.   Sp = sprite(me.spriteNum)
  22.   menuTree = member("menutree")
  23.   tragic = Sp.member.text
  24.   repeat with i = 1 to menuTree.line.count
  25.     if menuTree.line[i] contains ActiveSection then
  26.       repeat with o = 1 to menuTree.line[i].word.count
  27.         if menuTree.line[i].word[o] contains "@@" then
  28.           lineEnd = menuTree.line[i].word.count
  29.           ActiveSection = menuTree.line[i].word[o..lineEnd]
  30.           delete ActiveSection.char[1..2]
  31.         end if
  32.       end repeat
  33.       repeat with k = i + 1 to menuTree.line.count
  34.         if menuTree.line[k] contains tragic then
  35.           put "Found"
  36.           repeat with l = 1 to the number of words in menuTree.line[k]
  37.             if menuTree.line[k].word[l] contains "@@" then
  38.               lineEnd = menuTree.line[k].word.count
  39.               myPath = menuTree.line[k].word[l..lineEnd]
  40.               delete myPath.char[1..2]
  41.             end if
  42.           end repeat
  43.         end if
  44.       end repeat
  45.     end if
  46.   end repeat
  47.   gActionPath = gRootPath & "DiscContent" & dv & ActiveSection & dv & myPath & dv
  48.   put gActionPath
  49.   GatherActions(gActionPath)
  50.   sendAllSprites(#HideMenu, 0)
  51. end
  52.