Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

volume control in director for avi movies

Status
Not open for further replies.

directorguy

Programmer
Nov 10, 2000
16
0
0
US
does anyone know how to add a volume control icon in director to control my avi audio level?
Thanks
 
-- to add volume
on mouseUp
global volume

put the volume of sprite 1 into volume

if volume < 255 then
put volume + 5 into volume
set the volume of sprite 1 to volume
else
nothing
end if
end

This value can be setted from 0 to 255. If you wanna reduce the volume you can use -5 ou another value.

-- to reduce volume
on mouseUp
global volume

put the volume of sprite 1 into volume

if volume > 0 then
put volume - 5 into volume
set the volume of sprite 1 to volume
else
nothing
end if
end
 
xtra tip

if you are working with soundfiles; ie .mp3 etc you will need to control sound 1 and not sprite 1 as shown below

on mouseUp
global volume

put the volume of sound 1 into volume

if volume < 255 then
put volume + 5 into volume
set the volume of sound 1 to volume
else
nothing
end if
end
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top