Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE FLASH: HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

FLV audio keeps playing when navigating to different section of page

Cow Forums : Adobe Flash

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
cowcowcowcowcow
FLV audio keeps playing when navigating to different section of page
by Adam Clark on Jan 21, 2009 at 1:20:44 am

So, just like the title says. My FLV videos play just fine, however when I click on any of the navigation buttons to visit another section of my website, the audio keeps on going. There must be some simple AS to stop the audio once a button is clicked. As it is now, the user has to stop the audio manually by clicking the stop button on the FLV playback component. I am using AS3, thanks for viewing and for any input.

Respond to this post   •   Return to posts index

Re: FLV audio keeps playing when navigating to different section of page
by Anthony Sutliff on Feb 28, 2009 at 4:12:08 pm

Adam,
I Had the same problem, took me two weeks to figure out. I found this code on a Blog. Paste this code in your actions layer above each section of your site: in Home, About, Reel, Portfolio etc..You get the idea. It worked for me. You have to paste it in each section on the main timeline, not just the first frame in actions layer. No more hearing my demo reel audio when you click on another section of my site. Good Luck!




import flash.media.SoundMixer;

SoundMixer.stopAll();


Respond to this post   •   Return to posts index

Re: FLV audio keeps playing when navigating to different section of page
by John Taylor on Mar 26, 2009 at 7:32:00 pm

Adam:

I have the same problem and being new to as3, the response wasn't clear to me. I tried adding the snippet that was posted, but no luck. Here's my code for my .swf file:

import fl.video.VideoEvent;

myPoster.addEventListener(MouseEvent.CLICK, playMovie);

function showPosterFrame(event:Event):void {
myPoster.visible = true;
}

function hidePosterFrame(event:Event):void {
myPoster.visible = false;
}

function playMovie(event:MouseEvent):void {
myVideo.play();
}

myVideo.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, hidePosterFrame);
myVideo.addEventListener(VideoEvent.COMPLETE, showPosterFrame);


Any help would be appreciated,
Thanks,



Respond to this post   •   Return to posts index


Re: FLV audio keeps playing when navigating to different section of page
by John Taylor on Mar 26, 2009 at 11:00:51 pm

Sorry, I meant that last post to be addressed to both Adam and Anthony.


Respond to this post   •   Return to posts index

Re: FLV audio keeps playing when navigating to different section of page
by Adam Clark on Apr 3, 2009 at 12:48:32 am

Hi John,

It worked for me. I just plugged in the code....


import flash.media.SoundMixer;

SoundMixer.stopAll();


Just like Anthony says, make sure you place this code in each of the sections of your page (Home, Portfolio, Info etc.) Good luck



Respond to this post   •   Return to posts index

Re: FLV audio keeps playing when navigating to different section of page
by Steve McCrae on Aug 18, 2009 at 5:24:13 pm

Has anyone found a real solution to this, because simply killing the audio isn't going to stop the video download from occurring, which will just slow down the experience for the user?

i've been trying to deal with this for 4 days and it's aggravating. i have an .flv movie on Frame 1 and I don't have it displayed on frame 2. But the sound continues on Frame 2; it refuses to die. The above code works, but I know that isn't the right way to handle it.

Any solutions? Stop actions for the component and instance (I place it in a movie clip so it only exists in frame 1) aren't working either.

Respond to this post   •   Return to posts index


Re: FLV audio keeps playing when navigating to different section of page
by John Taylor on Aug 21, 2009 at 9:04:59 pm

Adam (and Anthony), I just came back to CC after many months. You guys were right on the money;this did the trick. I hope to give back to the flash community as I get better educated. John

Respond to this post   •   Return to posts index

Re: FLV audio keeps playing when navigating to different section of page
by Chad Hardy on Sep 24, 2009 at 3:18:48 pm

What about all the Flash sites out there that have mp3 players in them? The code you give above stops all audio no tjust the audio associated with a video. There has to be a better way to do this.

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]