Video.clear()
803
Returns
Nothing.
Description
Method; specifies a video stream (
source
) to be displayed within the boundaries of the Video
object on the Stage. The video stream is either an FLV file being displayed by means of the
NetStream.play()
command, a Camera object, or
null
. If
source
is
null
, video is no longer
played within the Video object.
You don’t have to use this method if the FLV file contains only audio; the audio portion of an
FLV files is played automatically when the
NetStream.play()
command is issued.
If you want to control the audio associated with an FLV file, you can use
MovieClip.attachAudio()
to route the audio to a movie clip; you can then create a Sound
object to control some aspects of the audio. For more information, see
MovieClip.attachAudio()
.
Example
The following example plays live video locally:
var my_video:Video; //my_video is a Video object
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
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 class
,
NetStream class
Video.clear()
Availability
Flash Player 6.
Usage
my_video
.clear()
: Void
Parameters
None.
Returns
Nothing.
Summary of Contents for FLEX-FLEX ACTIONSCRIPT LANGUAGE
Page 1: ...Flex ActionScript Language Reference...
Page 8: ......
Page 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Page 76: ......
Page 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Page 135: ...case 135 See also break default strict equality switch...
Page 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Page 808: ...808 Chapter 7 ActionScript for Flash...
Page 810: ...810 Appendix A Deprecated Flash 4 operators...
Page 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Page 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Page 822: ...822 Index...