Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
SmoothMove ActiveX
3D SpeedPort Xtra
Create Icon
MIDIio
Using Director 7 (Special Edition)
Reference Xtra
MD5
Creating a Marquee Tool
PC Mac Lan
Export Text for proofing
MediaMacros Xtras Mall
 

 

 

Behavior ToolTip Behavior

Added on 6/29/1999

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: CicicDejan

ToolTip Behavior

--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 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 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  MouseEnter  me
  set the text of member (the membernum of sprite tipSpriteNum) to TipText
end  MouseEnter

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

on  MouseWithin  me
  -- if close to left side of the stage then position of tip is equal with the left of sprite
  set stageWidth = the stageRight - the stageLeft
  if myright>(Stagewidth-20) then
    set tipHpos=myLeft-100
  else
    set tipHPos=(myRight+ myLeft)/2 -20
  end if
  if MyTop<(the stageTop+20) then
    set tipVpos=mybottom+10
  else
    set tipVpos=MyTop -20
  end if
  set the locH of sprite tipSpriteNum to tipHpos+Hoffset
  set the locV of sprite tipSpriteNum to tipVpos+Voffset
end
end  MouseWithin


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 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

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail