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
Universal serial port behavior
Format Text
Slider puzzle (imaging lingo)
ProMusicLoops
Fade In and Out plus other commands
Behavior Writer
Windows NT and Audio
Count Down Timer
WinGroup Xtra
Wait for DirectMediaXtra Sprite to finish Playing
 

 

 

Behavior Sound on/off - MCI

Added on 1/28/2000

 

Compatibilities:
behavior D6_5 D7 D8 PC

This item has not yet been rated

Author: JulioPerdigao

JDP Sound On, Off - Enable and disable the sound speaker

--JDP EasyBehavior - 1999 JDP - Julio Diniz Perdigao


property  Event, mode

on initGotoFrame me
  init me
end

on mouseUp me
  if Event = #mouseup    then init me
end

on mouseDown me
  if Event = #mouseDown   then init me
end
on mouseEnter me
  if Event = #mouseEnter    then init me
end

on mouseLeave me
  if Event = #mouseLeave    then init me
end

on enterFrame me
  if Event = #enterFrame  then init me
end

on exitFrame me
  if Event = #exitFrame  then init me
end

on init me
  if the mode of me = #"on" then
    mci "open cdaudio"
    MCI "set cdaudio AUDIO ALL ON"
  else
    MCI "set cdaudio AUDIO ALL OFF"
   mci "close cdaudio"
  end if  
end


on getPropertyDescriptionList  
  set p_list = [ ¬
  #Event: [ #comment:   "Handler:", ¬
                    #format:   #symbol, ¬
                     #range: [ #MouseUp, #MouseDown, #MouseEnter, #MouseLeave, #EnterFrame, #ExitFrame], ¬
                   #default:   #MouseUp ], ¬
      #Mode: [ #comment:   "Action:", ¬
                    #format:   #symbol, ¬
                     #range: [ #"On", #"Off"], ¬
                   #default:   #"On" ] ¬
  ]
  return p_list
  
end

 


Contact

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

Send e-mail