When I stop a sound object, my video sound stops, too.

I hope that someone can offer some advice. I have a flash file with a sound object of background music, and I have a video player to a particular section on the timeline. When the playhead goes to the section with the video player, I would like the background music to fade, but of course, I need the volume to be in place for the video. The code I have works find to fade the audio, but the problem is that sound of the video also turns off. Someone could please take a look at my code and let me know what I am doing wrong?

This is the code at the beginning of the timeline:


_Global.volumeVar = 40;  Stores the current volume.

bgSound = new Sound (this);                    This block works fine
bgSound.attachSound ("music");
bgSound.start (0.99).

bgSound.setVolume (0);

var nInterval:Number = setInterval (fadeInSound, _global.volumeVar);    If fading in music - works fine

function fadeInSound (): Void //this {feature works very well
If (bgSound.getVolume (), _global.volumeVar & & _global.off0n == 1) {}
bgSound.setVolume (_root.bgSound.getVolume () + 2);
} else {}
clearInterval (nInterval);
}
}

function fadeOutSound (): Void {lowest called //gets in the timeline panel
If (bgSound.getVolume () > 0) {}
bgSound.setVolume (_root.bgSound.getVolume () - 5);
} else {}
bgSound.setVolume (0);
_root.setVolume (100);          This would turn on the video sound, but there is no hope
clearInterval (nInterval);
}

Further to the bottom of the timeline, in the VCR section, it this code, which works to fade the sound, but seems to disable the video, too:

nInterval = setInterval (fadeOutSound, _global.volumeVar);


Thank you very much for the research. I have been looking and working on this problem all day and can't seem to find the answer. Sounds easy in theory, but I can not get the sound object and audio video to stay separated. They are both on or both off the coast. Does anyone have any experience with allowing them to share? Thank you very much!

Try:

_Global.volumeVar = 40;

var mc:MovieClip=this.createEmptyMovieClip("mc",this.getNextHighestDepth());

bgSound = new Sound (mc);                    This block works fine
bgSound.attachSound ("music");
bgSound.start (0.99).

bgSound.setVolume (0);

var nInterval:Number = setInterval (fadeInSound, 70);    If fading in music - works fine

function fadeInSound (): Void //this {feature works very well
If (bgSound.getVolume)<_global.volumeVar &&="" _global.off0n="=" 1)="">
bgSound.setVolume (_root.bgSound.getVolume () + 2);
} else {}
clearInterval (nInterval);
}
}

function fadeOutSound (): Void {lowest called //gets in the timeline panel
If (bgSound.getVolume () > 0) {}
bgSound.setVolume (_root.bgSound.getVolume () - 5);
} else {}
bgSound.setVolume (0);
clearInterval (nInterval);
}

Further to the bottom of the timeline, in the VCR section, it this code, which works to fade the sound, but seems to disable the video, too:

nInterval = setInterval (fadeOutSound, 70);

Tags: Adobe Animate

Similar Questions

  • Computer hangs during playback of youtube videos, it happens only when it reaches a sound louder

    bad play a youtube video with the helmet and the computer behaves very well, if I use the internal speakers in my laptop and it happens to a strong section of the video, it will freez and spray the loud noise and I have to hard reboot, or bring up the Task Manager and cancel the Task Manager so that it can stop

    Original title: sound recording play computer postilions while watching youtube videos and it freezes the computer often, it happens that when it reaches a sound louder

    Hello

    1 is this problem limited only during playback of videos in Youtube?

    2 are you using Internet Explorer while watching videos online? If so, what is the version?

    (See: http://windows.microsoft.com/en-US/windows7/Find-out-which-version-of-Internet-Explorer-youre-using )

    3 did you changes to the computer before the show?

    Method 1: Run the Fixit described in the article:

    Playing video files crashes or blocking Internet Explorer - Windows
    http://support.Microsoft.com/mats/video_freezes_or_crashes/en-us

    Also run the troubleshooter of material to check if the internal speakers work properly or not.

    Open the hardware and devices Troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter

    Method 2: Put the computer to boot and search for the issue.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135

    Note: once you are done with the boot, follow step 7 of article to put your computer to normal startup.

    I hope this helps.

  • When I start the computer, my computer opens with a music (sound) very short and when I stopped, it closes with a short, loud music, causing disturbances to third parties. How to remove this noise?

    When I start the computer, my computer opens with a music (sound) very short and when I stopped, it closes with a short, loud music, causing disturbances to third parties. How to remove this noise?

    Hello

    1 how long have you been faced with this problem?
    2. don't you make changes on the computer before this problem?

    Step 1: Search for the issue in the clean boot state.

    From your computer by using a minimal set of drivers and startup programs so that you can determine if a background program is interfering with your game or program. This type of boot is known as a "clean boot".

    Reference:
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
    a. Click Start and then click Run.
    b. type msconfigand click OK.

    The System Configuration Utility dialog box appears.

    c. click on the general tab, click Normal Startup - load all services and device drivers and then click OK.
    d. When you are prompted, click on restart to restart the computer.

    Step 2: Change or disable startup Windows and exit Windows sound and check.

    a. click Start, click Run, type mmsys.cpland then click OK.
    b. click the sounds tab.
    c. under program events, click Start.
    d. in the sounds box, click (none), or different sound, and then click OK.
    e. click exit Windows.
    f. in the sounds box, click (none), or different sound, and then click OK.

  • Problem of imagery when I stop bringing on my export.

    Can someone explain what is happening here?

    I'm having a problem of imagery when I break my calendar area. And this problem of imaging extends to my export. Basically when I stop, translucent color bars cover the image, making it difficult to adjust the overlays of text and others. But the difficult part is that these bars of color carried forward to my export, flickering in and out on my video.

    So here's what it looks like when I play my calendar. Quite normal.

    Screen Shot 2015-10-04 at 8.51.25 PM.png

    Here's what it looks like when I stop:

    Screen Shot 2015-10-04 at 8.51.28 PM.png

    And export vacillates between the two.

    To add to the mystery, it was also happening on other machines that I use. The only machine, sure it did not happen was a new Tower of Mac, I have in my office.

    I have already completely reinstalled first. Then I completely reinstalled the creative cloud entirely, including the Manager. Then I updated the OS to El Capitan. None of them got rid of the problem.

    -Luis

    Known issue with El Capitan

    Return to the MPE software for now (the project settings).

  • When I stop playing, the source monitor goes black. It does not show a still image after pausing.

    I just got a HP Prodesktop 400 G1 MT, Intel core I7 processor. In first 8 adobe, when I stop the video playback, the source monitor and program monitor won't give me a fixed image. As soon as the video is stopped, the screen is empty while normally, they would be in a freeze frame. the computer has an AMD radeon graphics card. I have two pc for dual monitors. I tried to play with the settings of reading to the premier, but no luck. I'm about to take the computer to be recovered. Any suggestions?

    Hello! Thank you for responding. I'm currently doing an update for my AMD display driver, and it is up to date. I called tech support and they helped me in the question of fixing from the option menu file - rendered video - general - project settings and playback - selecting mercury playback engine software only option. My computer was set to the GPU acceleration engine. It works fine now. Thanks.Aldo

  • When I stop the noise still continues

    When I stop the noise still continues. When I test the movie in the timeline and use the chronology does not break the sound with the image, it continues up to the stop, the problem is that I have very long sounds and he plays to the end.

    I'm guessing that the sound is embedded in the timeline panel. If this is the case, select the keyframe where the sound starts and then in the Properties window, set the property of synchronization for the sound selected 'Stream '.

  • Can I configure Thunderbird to close all tabs when I stopped it for the next session starts fresh.

    I'd rather have a working platform clearly every time I start Thunderbird and only see relevant tabs at this session. If the program can be assigned to close all tabs automatically when I stopped, which would solve my problem.
    Thank you
    Keith Marshall.

    I guess your best bet is to click the left tab-"Close other tabs" before closing in Thunderbird.

  • When Mac stop iPhoto books?  I had a print in December.  Photo books have fewer options

    When Mac stop iPhoto books?  I had a print in December.  The format of the photo books have fewer options for books

    .

    The end of March 2016.

    (141540)

  • When Apple stop producing iPhones 5s?

    Hello, I want to buy iphone 5s, but not now.

    When Apple stopped producing and selling the iphone 5 s?

    Until Apple makes an announcement, or until he arrives, no one here would know.

    They have already stopped making all models of 5 waiting space grey and silver 16gig 16gig.

  • Satellite L755D: Start button / stop static is red when I stop

    I have a Toshiba laptop, L755D.

    Recently, when I stop the laptop and turn off the power, the power led turns on a few seconds after stopping.
    He remains a static red color until I connect upward when it returns to normal color blue/white.
    While the stop of the battery loses the power of 1 to 2%.

    Can anyone help please?

    > While the stop of the battery loses the power of 1 to 2%.
    Check this box:
    Why lose 2 to 4% battery by turning off then back on my mobile device?
    http://APS2.toshiba-tro.de/KB0/FAQ9C012L0001R01.htm

    It is normal for a unit to lose between 2-4% battery, when to stop and reverse.
    Battery re-gauge it's self when starting back from an engine out of State. An accurate reading of the battery can take up to 5 minutes.

  • Qosmio F20-155: colors wrong when I try to use the S-video connection

    When I try to use the S-video, the photo shows with wrong colors or color of Pentecost. Do I need some kind of driver?

    Sometimes the photo looks like it (press the link to see)
    http://www.jawally.com/VB/uploaded/6_ss.gif

    Please give little assistance...

    Thank you for your time

    Majed

    Hello

    Just a question: you´re talk about the video-in and video output on your laptop, not an expansion or a USB-video output or something else card?
    A machine you have respectively which model do do you have?

    Greetings

  • I use images fixed high resolution but when the vid play they blur. They look strong when I stop. ***?!

    I use images fixed high resolution but when the vid play they blur. They look strong when I stop. ***?!

    Never had this problem before or on iMovie.

    Try to set a better quality in the view drop-down list top right of the Viewer window.

  • An050nr HP Star Wars: HP 15-an050nr restarts when the stop if she was in mode 'sleep'

    Hello

    Since the last 2-3 days I am facing a problem with my laptop that it restarts when I try to stop, but with what I've noticed, is that it does so only when he was previously been put in mode 'sleep' and once the restart occurs, and then when I stopped it it normally does. In addition, I also noticed that sometimes, Windows recognizes that the laptop was unplugged and need to change the parameters of the battery power supply and this is true for when I plug as well, it just does not respond to be plugged and unplugged. Any help is appreciated.

    Kind regards

    Hi@Roshaan-Shakeel,

    Welcome to the HP's Support Forums. Best platform for all kinds of solutions, tips and settings for your questions/problems.

    For the best experience on HP forum, see our Guide to HP Forums to learn more.

    Problems with the battery and PC stop. Is this fair?

    I would definitely help.

    Try to uninstall the controllers of battery from Device Manager and check if that supports the load indication problem.

    • Windows with your left hand and hold and then press the key for the letter X with your right hand.
    • Then select Design Manager in the list.
    • Right-click on compatible ACPI Microsoft control method battery and choose uninstall.
    • Close Device Manager, restart the PC.

    Hope this helps

    Resolv_S

    Happy to help you. I work for HP

    Please click on " ""Accept as Solution " " " if you feel my post solved your problem, it will help others find the solution.
    Click on the " Bravo Thumbs Up" " " to say 'Thank you' to help! "

  • Always leads when I stop my loop

    Dear all,

    Now, I used OR-6008, when I used case structure of program via the digital output. You can turn on and off. But when I tried to turn it on, then stop button while loop. The light that I connect to is always when I stop my program. How can I turn off which led when I stop my program?

    Thank you

    1. your outter loop is not necessary at all.

    2. you have a lot of duplicate logic.  If you're not over your threshold, of course you will be inferior to her.  If you can do a lot to reduce your logic.

    3 things will make a lot more sense if you convert your DAQ meter data immediately after the DAQ Assistant.

    4. move your writing digital output outside the structure of the case.  Also allow the timer to influence the case which is called.  In this way, you can tell the exit to go simply false when your stop the loop condition is met.

    5. as you collect only 1 analog value at a time, change your chart to a graph.  A graph has a history built into it, which I'm sure you would like to have.

  • How can I reset my VI to values by default when I stop it?

    Hello

    I have a VI to the evolution of the values when I click Start the start with the values of the site value, but when I stop my VI and I want to start it again that the values are the last values in memories until I stop the VI, to solve the problem is that I close my VI and I open the program again... it's not fun...

    I would like to know if there is a way to do this automatically, as if I click on change it menu on 'set values site '...

    Good bye.

    Hi leo2b,

    You can use the "Resettodefault" method at the end of your vi.

    See the attached example.

    Mike

  • the gme and NEXON combat arms was not letting me use the wasd keys to control. so I left the game, and when I stopped I had a noticce that says error code 21

    original title: Devicewhat is the error code 21

    I went on the nexon combat arms and the gme was not letting me use the wasd keys to control. so I left the game, and when I stop, I got a noticce that says error code 21! What it means?

    Hello

    We really need more information - ask in the games and/or Windows Forums for your
    version of Windows.

    Answers - Windows Forums
    http://answers.Microsoft.com/en-us/Windows

    You can also check your version of Windows, then good topic Windows: games.

    It is a question where you may need to actually test in several forums.

    Don't forget to check the known issues with the support from the game and forums, but also any device
    in question.

    -------------------------------------------

    Reboot to see if the problem comes back.

    Here are the general meaning.

    21

    Windows removes this device. (Code 21)

    Wait a few seconds, and then refresh the display of the Device Manager. If the device appears, restart the computer.

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

Maybe you are looking for