Got a video object and on it I want a play button to appear after the video is completed ala YouTube. Tried the following code but got a 1046: Type was not found error instead. Here's my code:
--
import fl.video.VideoEvent;
stop();
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
myVid.attachNetStream(ns);
var listener:Object = new Object();
listener.onMetaData = function(md:Object):void {};
ns.client = listener;
play_btn.addEventListener(MouseEvent.CLICK, playVideo);
function playVideo(evt:MouseEvent):void {
play_btn.visible = false;
ns.play("video.flv");
}
myVid.addEventListener(fl.video.VideoEvent.COMPLET E, playAgain);
function playAgain(v:VideoEvent){
play_btn.visible = true;
}