hello,
i’m working on a site, and i need to make a mp3 player for it. I have made everything but the volume bar because i couldn’t find a tutorial that describes it, how to do it the way i want. I would like to have one like the one on this site: http://www.justintimberlake.com .
I’m working with ActionScript 2.0 . And i use the “setVolume” function im my player script.
And, I would love it, if you could post the solution here, and explain it a bit, how it’s done instead of just uploading a fla file. Just because I’ve made everything else, it would be easier for me to fit it into the site i’m making and also other people who would view this thread in the future would understand it better.
EDIT 1::
I’ve just got an idea how to make it. So i think, what i need to do is, to make it as an usual slider. So if i take for example the slider from this tutorial kirupa.com - Slider Bars . The background triangle should be the “line” and the dragger sould be invisible (Alpha 0%). And than I only would have to apply second triangle above the first one in another color, wich shows up only to the place where the dragger is.
I’ll try to make this, and if it works I will post it so other people can make some use out of it as well ;]
EDIT 2::
Everything seems to work just fine, except for the fact that it doesn’t change the volume xD Here’s my ActionScript:
vol_mc.ratio=0 ;
vol_mc.dragger.onPress=function(){
vol_mc.dragger.startDrag(true,0,0,vol_mc.line._width,0);
vol_mc.onEnterFrame=function(){
ratio=Math.round(vol_mc._x100/vol_mc.line._width) ;
}
}
vol_mc.dragger._x = vol_mc.line._width100/100;
vol_mc.dragger.onRelease=vol_mc.dragger.onReleaseOutside=stopDrag;
var vol_proc:Number = vol_mc.dragger._x*100/30;
s.setVolume(vol_proc);