Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Director 7 and Lingo Bible
Print Dialog Behavior
Reshacker
Sprite player
simMode4.0 For multi-moniter
DM Transition Pack 1
RADEMAIL
RGB to CMYK
Go To The Frame - Blog about Lingo
Graph Class
 

 

 

Behavior Custom Hyperlink Colors And Cursor Change

Added on 11/20/2002

 

Compatibilities:
behavior D7 D8 D8_5 D9 Mac PC

This item has not yet been rated

Author: MediaMacros (website)

Allows custom colors for default and visited hyperlinks.

property spriteNum
property pDefColor
property pVisitedColor
property pMember
global gClickedList

on getPropertyDescriptionList me
  p = [:]
  p.addProp(#pDefColor, [#format : #color, #default : rgb(255, 0, 0), #comment : "Base Color"])
  p.addProp(#pVisitedColor, [#format : #color, #default : rgb(0, 255, 0), #comment : "Visited Color"])
  return p
end

on beginSprite me
  if gClickedList = void then gClickedList = []
  pMember= sprite(spriteNum).member
  pMember.usehypertextstyles = 0
  pMember.color = rgb(0,0,0)
  iHyperlinks = pMember.hyperlinks
  repeat with link in iHyperlinks
    linkName = pMember.name & "-" & link[1] & "-" & link[2]
    me.colorize(link, linkName)
  end repeat
  sprite(spriteNum).cursor = 0
end

on endSprite me
  sprite(spritenum).cursor = 0
end

on mouseWithin me
  if sprite(spriteNUm).pointInHyperlink(the mouseLoc) then
    if sprite(spriteNum).cursor <> 280 then
      sprite(spriteNum).cursor = 280
    end if
  else
    if sprite(spriteNum).cursor <> 0 then
      sprite(spriteNum).cursor = 0
    end if
  end if
end

on colorize me, link, linkName
  if gClickedList.getOne(linkName) then
    pMember.char[link[1]..link[2]].color = pVisitedCOlor
  else
    pMember.char[link[1]..link[2]].color = pDefColor
  end if
end

on hyperLinkCLicked me, d, link
  linkName = pMember.name & "-" & link[1] & "-" &  link[2]
  if gClickedList.getOne(linkName) = 0 then gClickedList.add(linkName)
  me.colorize(link, linkName)
end

on getBehaviorDescription me
  return "Place on a text member and set the colors for custom hyperlink colors."
end  

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail