This content has been marked as final. Show 7 replies
How are you playing the FLV? If you are using the pre-built components, then you would look in the help files for the Component Dictionary and see if there was anything there – my guess there isn't. In that case you would need to find the uncompiled version of the component poke around in its class files (probably for hours) and see if you could get some hacks into it to control that. In the end probably a bad way to go.
If you've made your own playback you will need to use attachSound to attach the sound to a Sound Object in a MovieClip instance. You can then use all the methods of the Sound class. Personally I would go this route.
There used to be some great tutorials at gotoAndLearn.com for how to build your own Media Player, but I don't see them right now. If you need help post back.
I guess I have to seperate the sound from the video in order to use the Sound functions.
no you dont..
s = new Sound(InstanceNameOfTheVideoContainer);
jottebotte – this actually works? Is that with the Flash 8 media components or is it with using the NetStream class? I had learned the way I mentioned above. It is a little more involved that what you have posted, but not much more.
And in either case, zband409, it isn't actually separating the sound from the video, it is just where the respective streams are routed inside the Flash player. I also made a mistake it is attachAudio(). Here is what I use:
var videoConnection = new NetConnection();
var videoStream = new NetStream(videoConnection);
You can then use any of the Sound methods with myVol.
Thanks Rothrock & Jottebotte.
Rothrock, your method works as well, sorry I'l go with the simple one.
Now I got another problem. I was thinking to use setPan function to switch the sound output between left and right speaks. Coz the source video file has 2 different audios in the left and right channel. But now it seems flash just mix both of the audios together after importing(FLV) . Any idea how to solve this problem?
How did you make the FLV? There should be an option to keep the audio as stereo.
There is, but what Flash did is mix the two channels together first and then split to stereo.
I simply used the import video in Flash.