Parameters
- A Camera object that is capturing video data or a NetStream object. To
source:Object
drop the connection to the Video object, pass
Example
The following example plays live video locally:
var my_video:Video; //my_video is a Video object on the Stage
var active_cam:Camera = Camera.get();
my_video.attachVideo(active_cam);
The following example plays a previously recorded file named myVideo.flv that is stored in
the same directory as the SWF file.
var my_video:Video; // my_video is a Video object on the Stage
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
my_video.attachVideo(my_ns);
my_ns.play("video1.flv");
See also
,
Camera
NetStream
clear (Video.clear method)
public clear() : Void
Clears the image currently displayed in the Video object. This is useful when, for example,
you want to display standby information without having to hide the Video object.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example pauses and clears video1.flv that is playing in a Video object (called
) when the user clicks the
my_video
var pause_btn:Button;
var my_video:Video; // my_video is a Video object on the Stage
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
my_video.attachVideo(my_ns);
my_ns.play("video1.flv");
pause_btn.onRelease = function() {
my_ns.pause();
my_video.clear();
};
for
null
source
instance.
pause_btn
.
Video
1277
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?