Need a stop and replay button for video web banner
I'm creating my first web banners using full motion video (flv). Needs to be under 40kb per the site's requirements.
I was finally able to get my file size down by avoiding the FLVplayer and using ActionScript (not at all my area of expertise).
I've managed to get the basic video working and playing but I need to add a stop button and a replay button (or return to the initial static image with the play button) at the end of the video.
Here's the code I've managed to piece together thanks to Google.
inv_btn.addEventListener(MouseEvent.CLICK,onReleaseMyButton);
function onReleaseMyButton(event:MouseEvent=null):void {
var myVideo:Video = new Video(300, 170); // note size for video
addChild(myVideo);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.client = new Object();
myVideo.attachNetStream(ns);
ns.play("http://www.dcccd.edu/images/DCCCDlogos/flash/welding.flv");
}
