|
-
VideoEvent.COMPLETE problems
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;
}
Adam Bell
[email protected]
--
Over 90% of all websites
suck......
Join the minority.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|