home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D World 117
/
3d-world-cd-117.iso
/
Interface
/
POPUP.dir
/
00006_Script_link_clicker
< prev
Wrap
Text File
|
2009-03-18
|
2KB
|
86 lines
global currentmember,pointclicked,wordnum,wordtext2,wordtext
property Sp
on mouseup me
wordText = currentMember.word[wordNum]
-- put "Clicked word" && wordNum & ", the text" && wordText
if wordtext contains "@" then
-- alert "you clicked email address"&&wordtext
gotonetpage ("mailto:"&wordtext)
else
nothing
end if
if wordtext.char[1..7] = "http://" then
gotonetpage (wordtext)
else
nothing
end if
if wordtext.char[1..8] = "https://" then
gotonetpage (wordtext)
else
nothing
end if
if wordtext.char[1..4] = "www." then
gotonetpage ("http://"&wordtext)
else
nothing
end if
end
on beginsprite me
Sp = sprite(me.spritenum)
pFormat()
end
on pFormat me
t = Sp.member
repeat with i = 1 to t.word.count
if t.word[i].char[1..7] = "http://" or t.word[i] contains "@" or t.word[i].char[1..4] = "www." or t.word[i].char[1..8] = "https://" then
t.word[i].color = rgb(255,255,255)
t.word[i].fontstyle = [#plain, #underline]
end if
end repeat
end
on mousewithin me
--cursor on
pointClicked = the mouseLoc
currentMember = sprite(me.spriteNum).member
wordNum = sprite(me.spriteNum).pointToWord(pointClicked)
if wordnum <> -1 then
wordText2 = currentMember.word[wordNum]
if wordtext2.char[1..7] = "http://" or wordtext2 contains "@" or wordtext2.char[1..4] = "www." or wordtext2.char[1..8] = "https://"then
cursor 280
else
cursor -1
end if
end if
end
on mouseleave
cursor -1
end