I have always been using this code
onClipEvent(load)
{
_root.mySound = new Sound();
maxvolume=100;
minvolume=0;
}
onClipEvent(enterFrame)
{
if(_root.soundstatus=="on") {step=3}
if(_root.soundstatus=="off") {step=-3}
maxvolume+=step;
if (maxvolume>100) {maxvolume=100;}
if (maxvolume<0) {maxvolume=0;}
Volume control Problem Solving at FixYa:: New dish reciever but can't control the volume. Solve this Problem Does anyone know what would have made my computer system sound control (volume http://www.fixya.com/tags/volume_controlHOME |
_root.mySound.setVolume(maxvolume);
}
to control the on/off function of the background music.
Ever since I upgraded to Flash Pro 8 this code has given me problems. The music doesn't play at all.
I know the problem might be the onClipEvent(enterFrame), but I can't figure out how to solve it.
Does anyone has a solution to this problem?
Take the code off the movieClip and then give the movieClip an instacne name of musicClip. then place this code in the same frame; Testing Capture and Playback Problems in Premiere for Mac OS:: Jan 4, 2007 You can test audio capture problems by using the the audio project settings in Premiere 6.5 in Mac OS X, the Sound control panel in Mac OS http://kb.adobe.com/selfservice/viewContent.do?externalId=312812HOME |
var mySound = new Sound(musicClip);
mySound.attachSound("linkageName");
var myVolume = 0;
mySound.setVolume = myVolume;
var playMusic:Boolean = true;
function setMusic() {
if (playMusic == true) {
playMusic = false;
musicClip.onEnterFrame = function() {
myVolume += 3;
mySound.setVolume = myVolume;
if (myVolume>97) {
myVolume = 100;
delete musicClip.onEnterFrame;
}
};
} else {
playMusic = true;
musicClip.onEnterFrame = function() {
myVolume -= 3;
mySound.setVolume = myVolume;
if (myVolume<3) {
myVolume = 0;
delete musicClip.onEnterFrame;
}
};
}
}
// turn the music on to start
setMusic();
// button code to toggle music on or off
btn_instance.onRelease = function() {
setMusic();
};
Also, google "Kenny Bellow flash sound tutorial". It has everything you needed to know about sound =)
Red Hat's Rough Recovery From CFO Exit
Windows Live Finds a New, Pre-installed Home
|