Flash Gallery | Flash Templates | Flash Menu | Flash Design | Flash Audio & Video

Video Corsi Actionscript 3.0


+ Reply to Thread
Results 1 to 5 of 5

Thread: after removeChild(); FLV sounds in the external file keeps playing...

  1. #1
    Junior Member Settled In Vudrok is on a distinguished road
    Join Date
    Sep 2007
    Posts
    17
    Rep Power
    0

    Unhappy after removeChild(); FLV sounds in the external file keeps playing...

    amazing Flash templates
    Ok, this is the problem, i build an interface where all the sections and videos are loaded from an external swf file, so i use the addChild to add that and removeChild to remove it, when i addChild(); an swf in which there is a flv file playing video and sound, the file will remove only video and images inside that swf but the sound will keep playing, sorry about this question might be something easy that I dont know about, can anyone help me?? thanks.



  2. #2
    Moderator Moving My Stuff To The FlepStudio tem is on a distinguished road tem's Avatar
    Join Date
    Jan 1970
    Posts
    638
    Rep Power
    41

    Re: after removeChild(); FLV sounds in the external file keeps playing...

    Hi!
    try something like:
    Code:
    my_flvPlayer.stop();

  3. #3
    Junior Member Settled In Vudrok is on a distinguished road
    Join Date
    Sep 2007
    Posts
    17
    Rep Power
    0

    Re: after removeChild(); FLV sounds in the external file keeps playing...

    I wish that could be that easy, the swf file is being imported using the addChild method to a loader, and then removeChild(loader); that's how im removing it and i can't just say loader.stop(); i might have to do something like this but i tried and it doesn't work.

    loader.loaderContentInfo.addEventListener(Event.CO MPLETE, onComplete);

    function onComplete(event.Event):void {
    event.target.content.myFlvplayer.stop();
    }

    but that would just stop it when it finish loading, i think i need to embed a button in that swf file that controls the flvplayer and then linkage for actionscript and try to add it an event listner, the think is that it only works adding it through the loader once it's been just loaded, I think im not good explaining my self, i'll upload an example later, thanks.

  4. #4
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,452
    Rep Power
    8

    Re: after removeChild(); FLV sounds in the external file keeps playing...

    Quote Originally Posted by Vudrok View Post
    I wish that could be that easy, the swf file is being imported using the addChild method to a loader, and then removeChild(loader); that's how im removing it and i can't just say loader.stop(); i might have to do something like this but i tried and it doesn't work.

    loader.loaderContentInfo.addEventListener(Event.CO MPLETE, onComplete);

    function onComplete(event.Event):void {
    event.target.content.myFlvplayer.stop();
    }

    but that would just stop it when it finish loading, i think i need to embed a button in that swf file that controls the flvplayer and then linkage for actionscript and try to add it an event listner, the think is that it only works adding it through the loader once it's been just loaded, I think im not good explaining my self, i'll upload an example later, thanks.
    Code:
    function onComplete(event.Event):void {
         var swf:MovieClip=loader.content as MovieClip;
         swf.myFlvplayer.stop();
    }

  5. #5
    Junior Member Settled In Vudrok is on a distinguished road
    Join Date
    Sep 2007
    Posts
    17
    Rep Power
    0

    Smile Re: after removeChild(); FLV sounds in the external file keeps playing...

    Yeah I finally did it!! the problem seems to rely in some bad syntax in some of my code inside my application, for some reason flash debugger is not telling me that i had this error in my code, as soon as i fixed it, it is playing now smoothly, so if you ever get this kind of error check all of your code and when you fix it no more weird behavior from flash player!! thanks you all!!

+ Reply to Thread

Similar Threads

  1. Stop an external swf file from playing
    By davebennettcayman in forum Flash English
    Replies: 3
    Last Post: 15-05-09, 19:05
  2. Help with loading external flash file
    By srivatson in forum HELP free utilities
    Replies: 0
    Last Post: 08-12-08, 13:32
  3. Run External Javascript file
    By martoon99 in forum Actionscript 3.0 newbies
    Replies: 0
    Last Post: 27-10-08, 07:31
  4. loading external text file in nested flash file
    By angel3m in forum HELP free utilities
    Replies: 0
    Last Post: 16-07-08, 22:18
  5. Stop an external swf file from playing
    By davebennettcayman in forum Flash Italiano
    Replies: 0
    Last Post: 10-07-08, 18:35

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO