744
Chapter 12: ActionScript Dictionary
You cannot declare a variable scoped to another object as a local variable:
my_array.length = 25;
// ok
var my_array.length = 25; // syntax error
When you use
var
, you can strictly type the variable; see
“Strict data typing” on page 38
Note:
Classes defined in external scripts also support public, private, and static variable scopes. See
Chapter 9, “Creating Classes with ActionScript 2.0,” on page 155
and
private
,
public
,
and
static
.
Video class
Availability
Flash Player 6; the ability to play Flash Video (FLV) files was added in Flash Player 7.
Description
The Video class lets you display live streaming video on the Stage without embedding it in your
SWF file. You capture the video by using
Camera.get()
. In files published for Flash Player 7 and
later, you can also use the Video class to play back Flash Video (FLV) files over HTTP or from the
local file system. For more information, see
“Playing back external FLV files dynamically”
on page 197
,
NetConnection class
, and
NetStream class
.
A Video object can be used like a movie clip. As with other objects you place on the stage, you can
control various properties of Video objects. For example, you can move the Video object around
on the stage by using its
_x
and
_y
properties; you can change its size using its
_height
and
_width
properties, and so on.
To display the video stream, first place a Video object on the Stage. Then use
Video.attachVideo()
to attach the video stream to the Video object.
To place a Video object on the Stage:
1
If the Library panel isn’t visible, select Window > Library to display it.
2
Add an embedded Video object to the library by clicking the Options menu on the right side
of the Library panel title bar and selecting New Video.
3
Drag the Video object to the Stage and use the Property inspector to give it a unique instance
name, such as
my_video
. (Do not name it Video.)
Method summary for the Video class
Property summary for the Video class
Method
Description
Video.attachVideo()
Specifies a video stream to be displayed within the boundaries of the Video
object on the Stage.
Video.clear()
Clears the image currently displayed in the Video object.
Property
Description
Video.deblocking
Specifies the behavior for the deblocking filter that the video compressor
applies as needed when streaming the video.
Video.height
Read-only; the height of the video stream, in pixels.
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...