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
new Rollover JB
Face Mouse-Alphamania
Handler Menu
Connect 4
KeyboardControl Xtra Lite
Focus 3D
dvd.duck
List of Globals
Scale Vertexlist
3D SpeedPort Xtra
 

 

 

Behavior Rollover Sound

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 Mac PC

Rating:

Author: DevinAgnew

Plays a sound on rollover

property  OverSound, OverSoundChannel
property  X, Y, Num

on MouseWithin me  
  if NOT SoundBusy(OverSoundChannel) then
    puppetSound OverSoundChannel, OverSound
  end if
  if the lastEvent < 20 then
    set the volume of sound OverSoundChannel to 255
  else
    set the volume of sound OverSoundChannel to 0
  end if
end


on mouseLeave me
  puppetSound OverSoundChannel, FALSE
end


on beginSprite me
  set Num to the spriteNum of me
end


on getPropertyDescriptionList  
  set p_list =[ #OverSound:       [#comment:"Rollover Sound:", #format:#sound,   #default:"" ], ¬
                            #OverSoundChannel:[#comment:"Channel Number:", #format:#integer, #default: 1 ]]
  return p_list
end

on getBehaviorDescription
  return ¬
            "Use this simple behavior to have a Sound play while you move the mouse over the sprite"
end  

 


Contact

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

Send e-mail