PDA

View Full Version : Button Volume Control


JRDavid01
04-16-2004, 06:55 PM
Hi,

I have a button that looks like a speaker and 3 half-circle rings around it. I cannot get it so I can click on the Speaker button and have a new ring appear (or disappear, depending if the 3 ring is showing, then have no rings showing) and have the volume change along with it (no rings = 0 volume, 1 ring = 33 volume, ...). If somebody could provide me with some code that would be awesome.

Thanks!

farafiro
04-18-2004, 03:06 AM
JRDavid01
welcome to the forums
var theNum:Number = 0
for (i=1; i<4; i++) {
_level0["ringMc"+i]._visible = 0;
}
theBtn.onRelease = function(){
if(_level0.theNum<=3){
_level0.theNum++
}
if(_level0.theNum>3){
_level0.theNum= 0
}
}
function theRings(){
if(_level0.theNum>0){
_level0["ringMc"+theNum]._visibel = 1
}else if(_level0.theNum>=0){
for(i=1;i<4;i++){
_level0["ringMc"i]._visibel = 0
}
}
}
setInterval(theRings,100)

JRDavid01
04-18-2004, 01:17 PM
Thanks, Thats what I needed!

See ya

Hool
04-18-2004, 01:44 PM
i needed that too thx

farafiro
04-19-2004, 02:04 AM
you r most welcome mates