Dear all,
I have been building a site (www.dsalustrum.nl), you can visit it to see what i am trying.
I have a volume slider with mute button in the top right, which works fine.
Now in the “media” section, i have added a video using the standard flash import video function.
The problem is that the volume control in the video and background sound is not separate. Muting either mutes both, and the sounds get intermingeled.
Below is the AS2 code for the volume slider, i don’t have the standard video player code (don’t know where that is).
If anybody can tell me how to separate the volume controls
or
how i can tell the background sound to mute when the video is playing.
Additionally, i have a download link that doesn’t work (the link is valid). The code is below as well, i think this is a simpler issue, but i can’t seem to get it to work.
Any help is very much appreciated!
Regards,
Frederik
Volume slider:
var sound = 1;
var s:Sound = new Sound();
s.attachSound("love");
s.start(1,999);
s.setVolume(100);
var vol = 100;
mute_slash._visible=false;
mute_mc.onRelease = function() {
if (sound==1){
s.setVolume(0);
sound = 0;
mute_slash._visible=true;
}
else if(sound==0){
s.setVolume(vol*100);
sound = 1;
mute_slash._visible=false;
}
}
VolumE = function () {
var left:Number = volume_track._x;
var top:Number = volume_track._y;
var right:Number = volume_track._x+volume_track._width;
var bottom:Number = volume_track._y;
volume_slider._y=volume_track._y;
volume_slider._x=volume_track._x+volume_track._width;
volume_slider.onPress = function() {
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {
vol = Math.abs((this._x-volume_track._x)/(volume_track._width));
s.setVolume(vol*100);
};
};
volume_slider.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};
};
VolumE();
Download link:
stop();
download_logo.onRelease = function() {
download("http://delft.corps.nl/onderverenigingaen/aero/Lustrum_LXXX/Downloads/Lustrum_Logo_LXXX.pdf", "Lustrum_LXXX_Logo.pdf")
}