About the External API
671
You can find the sample source file, ExtInt.fla, in the Samples folder on your hard disk.
■
In Windows, browse to
boot drive
\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\ExternalAPI\simple example.
■
On the Macintosh, browse to
Macintosh HD
/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/ExternalAPI/simple example.
For a more complex example that uses the External API, see
“Controlling Flash Video with
the External API” on page 671
. For more information on local file security, see
“About local
file security and Flash Player” on page 679
.
Controlling Flash Video with the External API
The following procedure shows you how to control Flash Video (FLV) files using controls in
an HTML page and displays information about the video in an HTML text field. This
procedure uses the External API to achieve this functionality.
To build a Flash application using the External API:
1.
Create a new Flash document and save it as
video.fla
.
2.
Add a new video symbol to the library by selecting New Video from the pop-up menu in
the Library panel.
3.
Drag the video symbol to the Stage and give it an instance name of
selected_video
.
4.
Select the
selected_video
instance and then the Property inspector to resize the instance
to
320
pixels wide by
240
pixels high.
5.
Set both the
x
and
y
coordinates for the video’s position to
0
.
6.
Select the Stage and use the Property inspector to resize its dimensions to
320
pixels by
240
pixels.
Now the Stage matches the dimensions of the video instance.
NO
TE
Avoid using other methods of accessing the plug-in object, such as
document.getElementById("pluginName")
or
document.all.pluginName
, because these
other methods do not work consistently across all browsers.
Summary of Contents for FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Page 1: ...Learning ActionScript 2 0 in Flash...
Page 8: ...8 Contents...
Page 18: ...18 Introduction...
Page 30: ...30 What s New in Flash 8 ActionScript...
Page 66: ...66 Writing and Editing ActionScript 2 0...
Page 328: ...328 Interfaces...
Page 350: ...350 Handling Events...
Page 590: ...590 Creating Interaction with ActionScript...
Page 710: ...710 Understanding Security...
Page 730: ...730 Debugging Applications...
Page 780: ...780 Deprecated Flash 4 operators...
Page 830: ...830 Index...