Hello,
I am somewhat new to actionscripting and I couldn’t find anything about this in the CS3 forum. I am trying to add a preview image to an FLV player component. The code that I have is not working.
package {
import fl.video.FLVPlayback;
import flash.display.Sprite;
public class FLVPlaybackExample extends Sprite {
private var videoPath:String = "/video_promo/LP_Movie512K.flv";
private var previewImage:String = "/video_promo/preview_image.png";
public function FLVPlaybackExample() {
player.preview = previewImage;
player.source = videoPath;
player.skinBackgroundColor = 0x93ABD2;
player.skinBackgroundAlpha = 0.9;
}
}
}
What am I doing wrong here? The video loads fine, and both the video and the preview image are in the same directory. I took the initial code from the help documentation example code (hence, “FLVPlaybackExample”). I added in the lines calling for the preview which are not working.
It’s a bit annoying that nobody mentions how to do this, anywhere - even Flash developer center (http://www.adobe.com/devnet/flash/quickstart/flvplayback_component/#section4)
I’m really confused as to how to add any parameters for the FLV player component, so if anyone can explain in general terms what I’m doing wrong here, I’d appreciate it.
Thanks so much!