home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 74 / IOPROG_74.ISO / ioProg.exe / ioProg.DXR / Internal_237_ScriptLinkRecens.ls < prev    next >
Encoding:
Text File  |  2003-09-30  |  2.0 KB  |  50 lines

  1. global link, w
  2.  
  3. on mouseWithin me
  4.   if the mouseWord < 1 then
  5.     exit
  6.   else
  7.     if member(sprite(me.spriteNum).member).word[the mouseWord] contains "www" then
  8.       sprite(me.spriteNum).cursor = 280
  9.       w = the mouseWord
  10.       set the textStyle of word the mouseWord of member the name of the member of sprite(the spriteNum of me) to "underline"
  11.       set the foreColor of word w of member the name of the member of sprite(the spriteNum of me) to 3
  12.     else
  13.       set the textStyle of word w of member the name of the member of sprite(the spriteNum of me) to "plain"
  14.       set the foreColor of word w of member the name of the member of sprite(the spriteNum of me) to 255
  15.       w = 0
  16.       sprite(me.spriteNum).cursor = 284
  17.     end if
  18.   end if
  19. end
  20.  
  21. on mouseLeave me
  22.   set the textStyle of word w of member the name of the member of sprite(the spriteNum of me) to "plain"
  23.   set the foreColor of word w of member the name of the member of sprite(the spriteNum of me) to 255
  24.   w = 0
  25.   cursor(-1)
  26. end
  27.  
  28. on mouseDown me
  29.   if member(sprite(me.spriteNum).member).word[the mouseWord] contains "www" then
  30.     if chars(word the mouseWord of the text of member the member of sprite(the spriteNum of me), 1, 1) = "(" then
  31.       link = chars(word the mouseWord of the text of member the member of sprite(the spriteNum of me), 2, the number of chars in word the mouseWord of the text of member the member of sprite(the spriteNum of me))
  32.     else
  33.       link = word the mouseWord of the text of member the member of sprite(the spriteNum of me)
  34.     end if
  35.     if chars(link, the number of chars in link, the number of chars in link) = ")" then
  36.       link = chars(link, 1, the number of chars in link - 1)
  37.     else
  38.       if chars(link, the number of chars in link, the number of chars in link) = "." then
  39.         link = chars(link, 1, the number of chars in link - 1)
  40.       else
  41.       end if
  42.     end if
  43.     if not (member(sprite(me.spriteNum).member).word[the mouseWord] contains "http") then
  44.       gotoNetPage("http://" & link)
  45.     else
  46.       gotoNetPage(link)
  47.     end if
  48.   end if
  49. end
  50.