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
Behavior Writer
Full Screen Projectors
Ripple Button-Alphamania
Bouncing Bevel Light-Alphamania
Sound 1 CuePoint
base64 encode/decode
DMFade
Acrobat ActiveX Control
Hide mouse on idle
SpriteMap
 

 

 

Behavior Moving tool tip

Added on 6/29/1999

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC Shockwave

Rating:

Author: CicicDejan

You need one text or field member for all tips for moving buttons. Just put one text member somewhere in the score and off the stage, and apply this behavior to moving button sprite. Hoffset and Voffset are for the fine position tuning."

--Tooltip behavior by Dejan Cicic
--copyright DEXSOFT Multimedia - 1999
--Use one sprite and one text or field member for all tips for buttons.
--Just put one text member off the stage and apply this behaviour
--to each moving button sprite.
Property SpriteNum
Property TipSpriteNum
Property TipText
property Hoffset
property Voffset
property mySprite
property myTop
property myLeft
property myRight
property myBottom
on beginSprite me
  set mySprite=the spriteNum of me
  set myTop= the Top of sprite mySprite
  put mytop
  set myBottom= the bottom of sprite mySprite
  put mybottom
  set myLeft= the left of sprite mySprite
  put myleft
  set myRight= the right of sprite mySprite
  put myright
  --off the stage tip sprite
  set the loch of sprite TipSpriteNum to -1000
end beginSprite

on exitframe me
  if  rollover(MySprite) then
    set the text of member (the membernum of sprite tipSpriteNum) to TipText
    set the locH of sprite tipSpriteNum to the locH of sprite MySprite+Hoffset
    set the locV of sprite tipSpriteNum to the locv of sprite MySprite+Voffset
    updatestage
    
  end if
end

on  MouseLeave  me
  --if not within sprite the put off the stage
  set the loch of sprite tipSpriteNum to -1000  
end  MouseLeave


on getPropertyDescriptionList
  Properties = [:]
  AddProp Properties,#TipSpriteNum,[#Default:1,#Format:#Integer,#Comment:"Sprite num for tip",#Range:[#Min:0,#Max:200]]
  AddProp Properties,#TipText,[#Default:"Toll tip text",#Format:#String,#Comment:"Text for a tip"]
  AddProp Properties,#Hoffset,[#Default:0,#Format:#Integer,#Comment:"Horizontal offset for fine position tuning",#Range:[#Min:-255,#Max:255]]
  AddProp Properties,#Voffset,[#Default:0,#Format:#Integer,#Comment:"Vertical offset for fine position tuning",#Range:[#Min:-255,#Max:255]]
  Return Properties
end getPropertyDescriptionList

on getBehaviorDescription
  BehDescription = "You need one text or field member for all tips for buttons. Just put one text member somewhere in the score and off the stage and apply this behaviour to moving button sprite. Hoffset and Voffset are for the fine position tuning."
  Return BehDescription
end getBehaviorDescription

on getBehaviorTooltip
  ToolTip = "Aplly this behavior for tooltip"
  Return ToolTip
end getBehaviorTooltip

 


Contact

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

Send e-mail