I have a component that uses the VideoDisplay class to play a video.
It is added to my component in it's constructor as follows:
/* --- VideoContent.as --- */
import mx.containers.HBox;
import mx.controls.VideoDisplay;
public class VideoContent extends HBox {
private var vid:VideoDisplay;
/**
* options.filename contains URL to the FLV to play
*/
public function VideoContent(options:Object) {
super();
width = options.width;
height = options.height;
vid = new VideoDisplay();
vid.autoPlay = vid.autoRewind = false;
vid.maintainAspectRatio = true;
vid.source = options.filename;
vid.width = width;
vid.height = height;
addChild(vid);
}
}
/* === VideoContent.as === */
The video is playing correctly, stopping/starting when I want, etc.,
but one of the FLVs I'm trying to load only plays out of the left channel.
I've tried setting the appropriate properties on the soundTransform of
the VideoDisplay, but it still only plays on the left channel. Is
there another way to control the sound of a VideoDisplay that I'm missing?
What I tried was (in the contructor):
...
vid.height = height;
vid.soundTransform.pan = 0;
vid.soundTransform.leftToRight = 1;