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 shape or vector shape type. For bitmaps 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 shape or vector shape type. For bitmaps use another behaviour."
end
on isOKtoAttach me, spriteType, spriteNum
case spriteType of
#graphic:
meType = sprite(spriteNum).member.type
return meType = #shape or meType = #vectorShape
#script:
return FALSE
end case
end
on beginSprite me
pTextSpriteNum = 1 -- the number of the refering scrolled text/field sprite
pMeSpriteNum = me.spriteNum
pMeCastLibNum = sprite(pMeSpriteNum).castLibNum
pMeHeight = (sprite(pMeSpriteNum).member).height
pMeStep = pMeHeight.float / sprite(pTextSpriteNum).pMeBottom
sprite(pMeSpriteNum).Height = 0
end
on prepareFrame me
pShift = sprite(pTextSpriteNum).member.scrollTop * pMeStep
sprite(pMeSpriteNum).Height = pShift
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA