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
MailTo Xtra
Wait for a MouseClick or Keypress
SecureNet Xtra
Easy Help
Compress integer list
Components XObject
Advanced Installer Professional
Text Member Menu System
Force Characters
File Save as..
 

 

 

Behavior ZGTSB-Bitmap Slider Scroll

Added on 5/22/2001

 

Compatibilities:
behavior D8 D8_5 Mac PC Shockwave

This item has not yet been rated

Author: Ziggi

This applies to slider sprite of the 'Ziggi Generic Text Scrolling Behaviours' set and brings the slider ability to scroll. The slider graphics must be of bitmap type. For shapes use another behaviour.

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

property pMaskMemberNum, pMeCastLibNum, pMeOrigRegPoint, pMeHeight, pMeStep, pTextSpriteNum, pShift

on getBehaviorDescription
  return "This applies to slider sprite of the 'Ziggi Generic Text Scrolling Behaviours' set and brings the slider ability to scroll. The slider graphics must be of bitmap type. For shapes use another behaviour."
end

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

on beginSprite me
  pTextSpriteNum = 1 -- the number of the refering scrolled text/field sprite
  pMaskMemberNum = sprite(me.spriteNum).memberNum + 1
  pMeCastLibNum = sprite(me.spriteNum).castLibNum
  pMeOrigRegPoint = (sprite(me.spriteNum).member).regPoint
  member(pMaskMemberNum, pMeCastLibNum).regPoint = pMeOrigRegPoint
  pMeHeight = (sprite(me.spriteNum).member).height
  pMeStep = pMeHeight.float / sprite(pTextSpriteNum).pMeBottom
end

on prepareFrame me
  pShift = sprite(pTextSpriteNum).member.scrollTop * pMeStep
  member(pMaskMemberNum, pMeCastLibNum).regPoint = pMeOrigRegPoint - [0, pShift]
end  

 


Contact

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

Send e-mail