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