Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Read Text from a file
simChatting Xtra
Set actionsEnabled Property of a Flash Member
Nero
Returns Rect of visible PDF doc within an Impressario sprite
Windows and Cascading Menus for Shockwave
PrintF in Lingo
Director 8 Primer
Sprite Player v.2
AnyShape Xtra
MediaMacros Xtras Mall
 

 

 

Behavior Volume Control-Button Only

Added on 10/2/2000

 

Compatibilities:
behavior D7 D8 PC

Required Xtras:
Buddy API

This item has not yet been rated

Author: MediaMacros (website)

This behavior is similar to the slider sound behavior but involves only an up and down button. Simply drag and drop and assign which is the up and which is the down button. Note that the sound notches can be different on this one.

property theVolume, whichWay, soundNotch, rolloverMember, defaultMember, clickMember, whatVolume, spriteNum

on getPropertyDescriptionList me
  thisSprite = the currentSpriteNum
  return [#soundNotch : [#format : #integer, #comment : "Number of sound notches:", #default : 10, #range : [#min : 5, #max : 30]], #rolloverMember : [#format : #member, #comment : "Rollover member", #default : (sprite thisSprite).member], #clickMember : [#format : #member, #comment : "Click member", #default : (sprite thisSprite).member], #whatVolume : [#format:#string, #comment : "What sound device?", #default : "Master", #range : ["Master", "CD", "Wave", "Midi", "Synth"]], #whichWay : [#format:#string, #comment : "Which Button", #default : "Up", #range : ["Up", "Down"]]]
end

on mouseEnter me
  (sprite spriteNum).member = rolloverMember
end

on mouseLeave me
  (sprite spriteNum).member = defaultMember
end

on mouseDown me
  (sprite spriteNum).member = clickMember
end

on mouseUp me
  (sprite spriteNum).member = defaultMember
  eachJump = 100.0/soundNotch
  if whichWay = "Up" then
    newVolume = baGetVolume(whatVolume) + eachJump
    if integer(newVolume) >= 100 then
      newVolume = 100
    end if
  else
    newVolume = baGetVolume(whatVolume) - eachJump
    if integer(newVolume) <=0 then
      newVolume = 0
    end if
  end if
  baSetVolume(whatVolume, integer(newVolume))
end

on beginSprite me
  theVolume = baGetVolume(whatVolume)
  defaultMember = (sprite spriteNum).member
end

on getBehaviorDescription me
  describe = "This behavior is similar to the slider sound behavior but involves only an up and down button.  Simply drag and drop and assign which is the up and which is the down button.  Note that the sound notches can be different on this one."
  return describe
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail