I was wondering is there was a way to control the volume of something with a
slider so that if the slider was one the value 0 there would be no sound, and
if it was on 100, the sounds was as high as it could go
For the script, I tried something like "set the playLoudness of player 1 to
value" Which obviously didn't work, and so yeah, I'm asking for your help..
a Slider to control volume of mp3 music in livecode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: a Slider to control volume of mp3 music in livecode
Hi Lina,
welcome to the forum!
Well, almost!
OK, create a slider, set its STARTVALUE to 0 and its ENDVALUE to 100 in the inspector.
Then add this script to the slider:
The SCROLLBARDRAG message is sent continuously to the scrollbar/slider while dragging and
the paramter tValue is the current value of the slider.
Best
Klaus
P.S.
Personal note:
A little "Hello" or something would not have hurt for the very first posting.
welcome to the forum!
Well, almost!
OK, create a slider, set its STARTVALUE to 0 and its ENDVALUE to 100 in the inspector.
Then add this script to the slider:
Code: Select all
on scrollbardrag tValue
set the playLoudness of player 1 to tValue
end scrollbardrag
the paramter tValue is the current value of the slider.
Best
Klaus
P.S.
Personal note:
A little "Hello" or something would not have hurt for the very first posting.
Re: a Slider to control volume of mp3 music in livecode
LOL
Sorry for that
Hi everyone my name is lina
Thank you for your help Klaus
Sorry for that
Hi everyone my name is lina
Thank you for your help Klaus
Re: a Slider to control volume of mp3 music in livecode
You're welcome!