PDA

View Full Version : FLV redirect causing an echo in my audio.


swnova22
04-25-2008, 07:29 PM
I have my flv redirecting to an html page with the following as that i found in another thread:

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
vidPlayer.attachVideo(ns);
ns.play("MasonJourney.flv");

ns.onStatus = function (infoObject:Object) {
if (infoObject.code == "NetStream.Play.Stop") {
getURL('http://www.ilmason.org/faq.html');
}
};
stop();


This is all working, but the audio is echoing. I took the actual object off the page, and the audio still plays, but it doesn't show the video. I know that it has something to do with this portion of the code:

ns.play("MasonJourney.flv");

But when I take that out and leave the video on, then the page doesn't redirect. Any ideas on how I can fix the echo? Here is a link to the page:
http://www.askamason.us/flash/transitionvid.html

swnova22
04-25-2008, 08:24 PM
help. please. my brain hurts.

ten90jwhite
04-25-2008, 08:34 PM
Can you upload a copy of your FLA so I can see it? It doesn't look like there is anything wrong with the code you've pasted here.

atomic
04-25-2008, 08:35 PM
ns.onStatus = function (infoObject:Object) {
if (infoObject.code == "NetStream.Play.Stop") {
ns.pause();
stopAllSounds();
getURL('http://www.ilmason.org/faq.html');
}
};

swnova22
04-25-2008, 08:44 PM
thanks Atomic for the reply. I replaced my code with yours and its not redirecting to the ilmason.org site....i've posted it here: http://www.askamason.us/flash/transitionvid.html

suggestions?

swnova22
04-25-2008, 09:01 PM
Now I see what you did. Its friday and i've been at this all afternoon. so please forgive my squishy brain. The stopallsounds isnt working. *sigh* I have attached my FLA if you or anyone can give me any more help.

ten90jwhite
04-25-2008, 09:16 PM
OK, here is what is happening:

You are attaching a video to a FLVPlayback component that already has that video as a contentPath parameter. This means that you are loading that video into the FLVPlayback component twice, which is where the echo is coming from. You'll want to instead create an event listener for the component rather than a NetStream class.

Helpful links:
http://livedocs.adobe.com/flash/8/main/00003515.html
http://livedocs.adobe.com/flash/8/main/00003620.html
http://livedocs.adobe.com/flash/8/main/00003615.html