home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D World 110
/
3DW_110.iso
/
mac
/
Menu
/
Scenes
/
home.dir
/
00058_Script_WebLinks
< prev
next >
Wrap
Text File
|
2008-09-12
|
2KB
|
96 lines
global currentmember,pointclicked,wordnum,wordtext2,wordtext
property scrollmode
property Sp
property cStart
on mouseDown me
scrollmode = "scroll"
cStart = sprite(me.spritenum).top + (sprite(me.spritenum).height / 2)
end
on mouseup me
scrollmode = "off"
pointClicked = the mouseLoc
currentMember = sprite(me.spriteNum).member
wordNum = sprite(me.spriteNum).pointToWord(pointClicked)
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 linkUpdate me
--
-- -- repeat with i = 1 to sprite(me.spritenum).member.word.count
-- -- if sprite(me.spritenum).member.word[i].char[1..7] = "http://" or sprite(me.spritenum).member.word[i] contains "@" then
-- -- sprite(me.spritenum).member.word[i].fontstyle = [#bold]
-- -- sprite(me.spritenum).member.word[i].color = rgb(230,150,0)
-- --
-- --
-- -- else
-- -- sprite(me.spritenum).member.word[i].fontstyle = [#plain]
-- -- end if
-- --
-- -- end repeat
--
-- t = sprite(me.spritenum).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,102,50)
-- -- t.word[i].font.underline = true
-- end if
--
-- end repeat
--
--end
on beginsprite me
-- t = sprite(me.spritenum).member
-- repeat with i = 1 to t.word.count
-- if t.word[i].char[1..7] = "http://" or wordtext2 contains "@" or wordtext2.char[1..4] = "www." or wordtext2.char[1..8] = "https://"then
-- t.word[i].color = rgb(255,255,255)
-- end if
--
-- end repeat
end
on mouseleave me
cursor -1
end