> Is there any lingo to make a tooltip on a sprite, like alt 
> text in html?

Here's a simple behavior I wrote. It requires you to hand-place the
sprite[s] and make them invisible.

It's set up to use a graphic tooltip or a text sprite with a shape
sprite for a black outline. Enjoy.
property pLabelSprite
property pOutlineSprite
property pVisible 

global theMenu

on beginSprite me
  -- save the sprite's visibile state and hide it
  pVisible = sprite(pLabelSprite).visible
  sprite(pLabelSprite).visible = FALSE
  if pOutlineSprite > 0 then
    sprite(pOutlineSprite).visible = FALSE
  end if
end

on endSprite
  -- reset the sprite's visibility to its original state
  sprite(pLabelSprite).visible = pVisible
  if pOutlineSprite > 0 then
    sprite(pOutlineSprite).visible = pVisible
  end if
end

on mouseDown me
  theMenu.clear()
end

on mouseUp me
  stopSound
  puppetSound 3, member "CLICK2"
  cursor -1
  hidesprite pLabelSprite
  if pOutlineSprite > 0 then
    sprite(pOutlineSprite).visible = FALSE
  end if
end

on mouseWithin me
  --  cursor 280
  showsprite pLabelSprite
  if pOutlineSprite > 0 then
    sprite(pOutlineSprite).visible = TRUE
  end if
end

on mouseLeave me
  --  cursor -1
  hidesprite pLabelSprite
  if pOutlineSprite > 0 then
    sprite(pOutlineSprite).visible = FALSE
  end if
end

on getPropertyDescriptionList me
  vPDList = [:]
  addProp vPDList,#pLabelSprite, [#default:10, #format:#integer, \
          #comment:"Label sprite:"]
  addProp vPDList,#pOutlineSprite, [#default:0, #format:#integer, \
          #comment:"Outline sprite:"]
  return vPDList
  
End

Cordially,

Kerry Thompson

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to