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
ResourceXObject
Video Status bar
Text Pop Up
Radians to degrees, degrees to radians
Prime Number Xtra
Macromedia Director 7 Lingo training CD
SpritePulsator
Move To Top
DisplayRes
Install
 

 

 

Behavior ZGTSB-ButtonUp

Added on 5/22/2001

 

Compatibilities:
behavior D8 D8_5 Mac PC Shockwave

This item has not yet been rated

Author: Ziggi

Scroll Up behavior for Text

Download PC Source    Download Mac Source
-- ZIGGI GENERIC TEXT SCROLLING BEHAVIOURS --
-- (C) 2001 Zbigniew Szczesny

property pMeSpriteNum , pMeMemberNum, pMeCastLibNum, pMeWasDown, pMeWasFast

on getBehaviorDescription
  return "This applies to the 'Scroll-Up' button sprite of the 'Ziggi Generic Text Scrolling Behaviours' set and the button must be of a bitmap, shape or vector-shape type."
end

on isOKtoAttach me, spriteType, spriteNum
  case spriteType of
    #graphic:
      meType = sprite(spriteNum).member.type
      return meType = #bitmap or meType = #shape or meType = #vectorShape
    #script:
      return FALSE
  end case
end

on beginSprite me
  pMeWasDown = FALSE
  pMeWasFast = FALSE
  pMeSpriteNum = me.spriteNum
  pMeCastLibNum = sprite(pMeSpriteNum).castLibNum
  pMeMemberNum = sprite(pMeSpriteNum).memberNum
end

on mouseEnter me
  sprite(pMeSpriteNum).member = member(pMeMemberNum + 1, pMeCastLibNum)
end

on mouseLeave me
  sprite(pMeSpriteNum).member = member(pMeMemberNum, pMeCastLibNum)
end

on mouseDown me
  pMeWasDown = TRUE
  pMeWasFast = FALSE
  sprite(pMeSpriteNum).member = member(pMeMemberNum + 2, pMeCastLibNum)
end

on mouseUp me
  pMeWasDown = FALSE
  sprite(pMeSpriteNum).member = member(pMeMemberNum + 1, pMeCastLibNum)
  if pMeWasFast = FALSE then slide
end

on mouseWithin me
  if the stillDown and pMeWasDown = TRUE and the lastClick > 15 then
    pMeWasFast = TRUE
    slideFast
  end if
end

on slide
  sendSprite(1, #scrollUp)
  sendSprite(2, #scrollUp)
end

on slideFast
  sendSprite(1, #scrollUpMore)
  sendSprite(2, #scrollUpMore)
end
  

 


Contact

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

Send e-mail