Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
An Unofficial Brief History of Director
Animated Slider Puzzle by J.R.D.R.
moving buttons
asASIOout
Merge sort and Binary Search using Lingo
Coloring Book
DOMAJ Site and Forum
Director 6.5 Stubs
MediaMacros Devcon Presentation 2002 - Imaging Lingo
Quiz engine
MediaMacros Xtras Mall
 

 

 

Behavior Toggle Pause / Play Audio

Added on 8/14/2003

 

Compatibilities:
D8 D8_5 D9 Mac PC Shockwave

This item has not yet been rated

Author: tcoursey

This script will pause the audio in channel 1 on the first click (by default) and then resume when clicked again. A nice toggle feature for pausing audio!

global tm
global paused
global soundfile

on beginsprite
  paused = 0
end

on togglesound
  soundfile = sound(1).member
  if paused = 0 then
    tm = sound(1).currenttime
    sound(1).pause()
    paused = not (paused)
  else if paused = 1 then
    sound(1).play([#member: member(soundfile), #startTime: tm])
    paused = not (paused)
  end if
end

on mouseup
  togglesound
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