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
Turn puppeting off for a range of sprite channels
Set Linked Property of a Animated Gif Cast member
Compound Interest
Volume Controller SWA(Shockwave Audio)
Flash Sprite -- Simple Controller [Play, Pause, Rewind]
Sprite Stick To Mouse Cursor
Soundoftheweb Network
Cycle Fades of Images and Text
DiskJockey CD-ROM Builder
Postscript to Vector Converter
 

 

 

Behavior ZGTSB-Shape Or Vector Shape 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 shape or vector shape type. For bitmaps use another behaviour.

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

property pMeSpriteNum, pMeCastLibNum, 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 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

Send e-mail