RemoveChild() but audio still plays

Hy!
I have a flash website where different pages are movieclips which are added or removed from the main stage, depending on which buttons are clicked.
The problem is that I have a 'video' page where a YouTube player is embedded. The video plays as soon as the movieclip loads, but when I remove the child from the stage and I add another movieclip on top of it, the audio still plays.
I have tried using the SounMixer.stopAll() but it works only when I test swf in Flash. When I open the swf separately from the folder it is in, it doesn't work anymore.
Can somebody please help me?
Thanks a lot!

It is not a FLVPlayback control, it is a YouTube ActionScript 3.0 Player API.
Here is the code :
// The player SWF file on www.youtube.com needs to communicate with your host
// SWF file. Your code must call Security.allowDomain() to allow this
// communication.
Security.allowDomain("www.youtube.com");
// This will hold the API player instance once it is initialized.
var player:Object;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit);
loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3")); //load the embedded player
play_btn.addEventListener(MouseEvent.CLICK, playVid);
pause_btn.addEventListener(MouseEvent.CLICK, pauseVid);
video1_btn.addEventListener(MouseEvent.CLICK,playVid1);
video2_btn.addEventListener(MouseEvent.CLICK,playVid2);
video3_btn.addEventListener(MouseEvent.CLICK,playVid3);
mute_btn.addEventListener(MouseEvent.CLICK,muteVideo);
unmute_btn.addEventListener(MouseEvent.CLICK,unmuteVideo);
function onLoaderInit(event:Event):void {
    addChild(loader);
    loader.content.addEventListener("onReady", onPlayerReady);
    loader.content.addEventListener("onError", onPlayerError);
    loader.content.addEventListener("onStateChange", onPlayerStateChange);
    loader.content.addEventListener("onPlaybackQualityChange", onVideoPlaybackQualityChange);
function onPlayerReady(event:Event):void {
    // Event.data contains the event parameter, which is the Player API ID
  trace("player ready:", Object(event).data);
  player = loader.content;
          player.loadVideoByUrl("http://www.youtube.com/v/v6oJ5rw9mys",0);
    // Set appropriate player dimensions an its position
  player.setSize(480, 360);
          player.x=50;
          player.y=220;
          video_title.text="Multiplying Sevens-Times Table";
function onPlayerError(event:Event):void {
    // Event.data contains the event parameter, which is the error code
    trace("player error:", Object(event).data);
function onPlayerStateChange(event:Event):void {
    // Event.data contains the event parameter, which is the new player state
    trace("player state:", Object(event).data);
function onVideoPlaybackQualityChange(event:Event):void {
    // Event.data contains the event parameter, which is the new video quality
    trace("video quality:", Object(event).data);
I have taken this code from its YouTube ActionScript 3.0 Player API Reference

Similar Messages

  • I removeChild but audio still plays

    I have as3 script that loads an external swf which contains flv video:
    var eventInitialLoader:Loader = new Loader();
    var eventInitialURL:String = parent['eventPath'+ie];
    var eventInitialRequest:URLRequest = new URLRequest(eventInitialURL);
    eventInitialLoader.load(eventInitialRequest);
    eventOdd.addChild(eventInitialLoader);
    ...And some script later on that removes it:
    eventOdd.removeChild(eventInitialLoader);
    The movie clip is removed but the audio continues to play. Why is this? What can I do to make sure the audio is removed also?
    Thank You!

    Hey BrianatArean I have the same problem . Were you using the Video class? I user this code to kill everything but the audio still plays:
    public function stopIt()
                video.clear();
                ns.close();
            public function killIt()
                 trace("VideoHandler.killIt() called");
                 stopIt();
                 _stage.removeChild(video);
                 nc.removeEventListener (NetStatusEvent.NET_STATUS,checkConnect);
                 ns.removeEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
                 nc.close();
                 video = null;
                 ns = null;
                 nc = null;
                 flag_Running =false;

  • Extracted audio still plays.

    Hi Everyone,
    I extracted the audio from a very short video clip. I want the clip to run in slow motion. My problem is that I don't hear any sound when I play the clip normally, but when I try to add the slow motion effect, the audio comes back. Any solutions?
    Thanks, Jennifer

    Sometimes (..always?..) when you try out an effect in the little Preview window, after the audio's been extracted, the audio still plays.
    However, that's just a feature (bug?) of the effect preview.
    My experience is that if you actually Apply the effect, when you've tested it - so that the timing is correct for what you want - the audio, in the real clip, does stay muted, etc.
    I've had muted ('extracted') audio still playing - in that teeny Preview window - when I try to slow down or reverse a clip. Nevertheless, when I've Applied the effect, everything's as it should be.
    I think that the Preview facility relies on a separate little QuickTime player, and that doesn't necessarily pick up all the alterations you've made to your project until after the effect has been Applied. (..The effect and transition Preview generally tries to play from a memory cache, so it plays back a clip from within the computer's memory, instead of reading from the list of recent alterations to the project, such as audio muting..)

  • After reducing audio in all clips, audio still plays?

    When making music videos, I reduce the volume to 0% in all the clips. This worked for a while, but after making multiple music videos, the audio still played AFTER I reduced it to 0%.

    That's a real shame, kinda renders the software useless if you cannot match video to music timing.. I just edited my first movie with imovie9 and the amount of bugs i found was astonishing. I feel i'm only doing simple things with it.
    Very disappointing..

  • I am importing a video and in iMovie the video is now white. the audio still plays and I can play the video properly outside of iMovie so any help is good?

    I am importing a video and in iMovie the video is now white. the audio still plays and I can play the video properly outside of iMovie so any help is good?

    I going to recommend again, downloading and installing some video helper applications.
    1. http://perian.org/ (this will add a number of different file types to the ones QuickTime already plays)
    2. http://www.divx.com/en/software/mac (will add more file types to what QuickTime can play)
    Either one of these might be necessary to get MPEG Streamclip to export the video. Failing that the only other thing I have found is an obscurve discussion thread on Avid.com:
    http://duc.avid.com/archive/index.php/t-277791.html
    I've figured out what the problem is on my end. The video came from Avid on a Windows machine and was encoded with Squeeze. I found out that the 2 seconds of black at the top of the video were at a different frame rate than the rest of the video. I chopped off the 2 seconds of black and started at the first frame of video, exported it with Quicktime Pro and was able successfully view the video in ProTools. Apparently Squeeze will let you create a movie file that has different frame rates within the same movie... This fixed my issue that was exactly as you describe, hopefully it might work for you.
    Lastly, you could try converting the video clip using HandBrake

  • The video picture is hang but audio keeps playing

    We are using FMS3.5 for VOD streaming. It’s spotted that when we are using Flash Player Version = WIN 10.0.42.34/10,0,45,2, it is encountered that the video picture is hang but audio keeps playing after our commercial break point. we will first pause the video content and then use the same object to play the instream ad. After that, the video is resume when instream ad complete.
    Thanks for helping!

    Hi,
    Can you pls pass me the client side code?
    Need to check if you are doing the right thing.
    Let me know the type of VOD and ad contents you are using.
    You can write me at [email protected]
    Regards,
    Janaki L

  • Video hangs while playing but audio still keeps pl...

    capturing a video works fine in my nokia c6-00. .but wen i play the captured video the video hangs for some minutes but the audio keeps on playing.  i am saving the videos on mass storage 8gb sd with 5gb free space. software version m using is 40.

    This is possibly a networking problem.   If the Apple TV and router lose connection, or the speed is too slow, it stops loading, or buffers.  
    Test your internet speed several times to see if it drops or is just too slow.
    Update you Apple TV if needed.  
    Refresh connections

  • When playing video, video pauses but audio keeps playing

    When I am watching a movie, using VLC player, the video randomly pauses. I can still hear the audio playing but the image does not change. I am not running any applications at the same time.
    Anyone else have this issue?
    Any idea on what could be causing it.

    I had something similar happen when transferring and converting tv shows off my Tivo to my iPod using Tivo desktop.  Found out that some channels allow insertion of local ads which messes up the time stream and from that point on the video would stop but audio would continue.
    My solution was to burn the shows that do that to DVD and then use Xilisoft DVD ripper to convert them to files I can import into iTunes.

  • Deleted audio still plays - help

    project in imovie hd. i have extracted the audio, lowered the audio in the video clip to 0%, and unchecked the audio box in the time line. most of the audio in the video clip is gone but about 2 seconds at the start and end of each video clip still plays. so you hear "and cut!" at the end!
    fyi i m working on a slient film so i dont care if all the video sound is gone. the soundtrack is done.

    most of the audio in the video clip is gone but about 2 seconds at the start and end of each video clip still play
    Do you by any chance have transitions where this happens?
    Extracting the audio from the clips before applying transitions prevents this.

  • Cannot see files in Windows Explorer, but iTunes still plays 'em

    hi all,
    I have all my music files on an external hard drive. Up until this morning, I could browse the files on the external drive using Windows Explorer. Now the iTunes Music folder appears empty when I click on it, and even says 0kbs when I right-click Properties.
    But ... iTunes still plays the files fine, and when I right-click Get Info in iTunes, it gives me the correct file path to my external hard drive. When I right-click Show Song in Windows Explorer, it shows me the correct file, yet when I click back up on the root iTunes Music folder, it still shows up empty!
    Any clues? This is most frustrating, as I just got a new laptop and am trying to get my iTunes library back on there.
    thanks

    Sorry for the double post.
    But i should also add that when i go to Edit Preferences and go to iPod and change anything i want to change. Once the ipod is disconnected, it doesnt save and it all goes back to the normal settings.
    Thanks again.

  • Ipod nano screen is white but music still plays

    I have a second generation nano and a couple of months ago I was in my car and turned on my iPod and it powered on but the screen was white. It still played music but I couldn't see what I was playing. Any ideas on how I might be able to fix this???

    Please describe in detail all you have attempted to do in order to resolve the issue.  Don't want to repeat any solutions you may have already tried.  For example, have you tried restoring or restting?

  • Premiere Pro CC freezes on a frame during playback, but audio keeps playing?

    Hi,
    First time poster, long time visitor to the boards. Running a new Mac "Pony Keg" (I think calling it a "trash can" invites bad performance ) with OSX 10.9.5.  Here's a recurring issue: I am playing back a sequence and then it will freeze on a frame (different everytime) and the audio keeps playing. I can stop the playback and it will continue to play, but the frame is locked in. Next, I'll quit out of the app, and try to reopen, but nothing happens because Premiere never actually quit. I'll pull up Force Quit window and it reads as "not responding." I'll Force Quit, relaunch the project and things will work again for a while, and then I need to do a whole reboot.  Any thoughts on what might be causing this freeze frame issue or why Premiere won't actually quit? I've seen these posts in some various threads, but not these two issues in the same thread. Thanks in advance for any help and insights offered!
    Best,
    Tracy

    Hi Tracy,
    I would suggest these things:
    Do this first: Premiere Pro CC, CC 2014, or 2014.1 freezing on startup or crashing while working (Mac OS X 10.9, and later)
    If that doesn't help, Change the Video Renderer to Mercury Playback Engine software only under File > Project settings > General. Delete previews after clicking on OK.
    If nothing helps, try this:
    Go to the following locations:
    Location 1: When in Finder, click on Go > Go to Folder > ~/Library/Application Support/Adobe
    Location 2: Go > Go to Folder > ~/Library/Preferences/Adobe
    Location 3: Documents > Adobe
    In all the locations, rename the 'Adobe' folders to 'OldAdobe'
    Launch Premiere, accept the License Agreement and see if it works.
    Note: You will lose your customized workspaces, keyboard shortcuts and media cache.
    Thanks,
    Rameez

  • HELP! iTunes Sais My iPod is Corrupted, But Music Still Plays

    I plugged in my iPod, and iTunes sais it is corrupted and to restore it, Windows sais it is corrupted also. But all the music and videos still play. I don't want to restore my iPod because my iTunes library got damaged and whenever I import all the songs again, it just gets damaged in a day. So I don't know what to do. Anyway I can fix it?
    It is the 5.5g iPod video, Windows XP, Intel Celeron D, 2.8ghz, Dell Dimension 1100, 1gb RAM. Itunes 7.0.1, and the firmware is the newest on the iPod, when I plug the ipod into iTunes it sais: "iTunes has detected an iPod that appears to be corrupted. You may need to restore this iPod before it can be used with Itunes. You may also try disconnecting and reconnecting the iPod.". And when I click on the iPod's drive letter in My Computer it sais the disk is not formatted, and it gives an option to do so. But all the music and videos still play fine on the iPod.

    I have the same problem... But after HOURS of trying any and all apple support/user submited suport ideas (all failed) i finaly broke down and restored my iPod. But it did nothing, all it did was instead of my iPod "booting" up and i could listen to my music (that was now skipping thanks to iTunes 7) i get a screen with a picture with the http://www.apple.com/support/ipod URL.... So now i have a $400 peice of junk just sitting their thanks to iTunes... isn't life great?
    Windows XP 4th Gen 40GB Click Wheel iPod
    Windows XP

  • Screen white but can still play music

    i went out of my house for a couple hours and i came back and i turned it on but the screen was white but when you double tap the home but to hit play/pause you can still liste to music.what should i do

    Try resetting your iPod:
    Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.

  • Ipod screen and controls freeze for 1 min but it still plays

    Hello, any and all help is appreciated.
    Listening to music, my ipod's screen and controls will freeze for about a minute, but the ipod still plays music when this happens. It happens every 5 minutes or so. Pretty weird. If I turn on the backlight and it freezes, the backlight will stay on for 1 minute until the thing unfreezes and it kills battery time.
    Also, it will remember any buttons that I press while it is in freeze mode and when it unfreezes, it will perform those functions. (i.e. if i'm listening to a song and the screen and controls freeze, it will continue to play that song. if i use the click wheel to change the volume, it won't work, but as soon as it unfreezes, the ipod will remember my actions and lower the volume eventhough i tried to adjust it 30 seconds ago. make sense?)
    Has this happened to anybody else? Is there anything I can do?

    Place the iOS device in Recovery Mode and then connect to your computer and restore to factory settings/new iPod via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    Then try to recover the information from the iPod
    via How to perform iPad recovery for photos, videos
      Wondershare Dr.Fone for iOS: iPhone Data Recovery - Wondershare Official

Maybe you are looking for

  • Installation Problems with Windows xp

    I'm hoping someone can help me with solving this problem... I've tried installing my licensed Windows XP following the instructions of Bootcamp Assistant. After I click begin installation I get a message stating that Mac cannot read the disk because

  • Primary Key - Generated by database TRIGGER

    Hi, I have a form with a block that is attached to a table. So far, nothing fancy :-) The Primary is generated with an ORACLE SEQUENCE. That is done at the TABLE level with a DATABASE trigger. So in the form, the primary field is not populated. Works

  • Data Acquisition problem with multiple length of commands and data received.

    Hello, I need to write a program to communicate with a Data Acquisition board. There are about 10 commads and each has a different number of bytes associated with it. For example command-1 has 4 bytes which need to be send to the DAQ, command 2 has 6

  • I have 2 Pages icons. How can I get rid of the old one?*

    I can't gey it out of launchpad. It won't go in the trash. It's confusing to have 2 icons.

  • Returns from consumption

    Hello! Does anybody have knowledge on returns from consumption? The more exact question is if it is possible to creata a return PO with account assignment category F?  Regards, Ileana