MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 617

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

5.
Select the Parameters tab, and click Launch Component Inspector.
6.
In the Component inspector, type http://www.helpexamples.com/flash/video/clouds.flv
in the URL text box.
7.
Open the Actions panel (Window > Actions), and type the following code in the
Script pane:
import mx.controls.MediaPlayback;
var my_mp:MediaPlayback;
my_mp.autoPlay = false;
my_mp.addEventListener("cuePoint", doCuePoint);
my_mp.addCuePoint("one", 1);
my_mp.addCuePoint("two", 2);
my_mp.addCuePoint("three", 3);
my_mp.addCuePoint("four", 4);
function doCuePoint(eventObj:Object):Void {
trace(eventObj.type + " = {cuePointName:" + eventObj.cuePointName +
" cuePointTime:" + eventObj.cuePointTime + "}");
}
8.
Select Control > Test Movie to test your code.
The following cue points trace in the Output panel:
cuePoint = {cuePointName:one cuePointTime:1}
cuePoint = {cuePointName:two cuePointTime:2}
cuePoint = {cuePointName:three cuePointTime:3}
cuePoint = {cuePointName:four cuePointTime:4}
For more information on working with the MediaPlayback component, see
components (Flash Professional only)" on page
the FLVPlayback component, see
on page
489.
Adding seek functionality with cue points
(Flash Professional only)
You can embed Navigation cue points in an FLV file to add seeking functionality to your
applications. The
seekToNavCuePoint()
cue point in the FLV file with the specified name, at or after the specified time. You can
specify a name as a string (such as
You can also use the
seekToNextNavCuePoint()
cue point, based on the current
which is the starting time from where to look for the next navigation cue point. The default
value is the current
playheadTime
813. For more information on working with
"FLVPlayback Component (Flash Professional Only)"
method of the FLVPlayback component locates the
or
"part1"
"theParty"
method, which seeks to the next navigation
. You can pass the method a parameter,
playheadTime
.
"Media
).
About using FLV video
,
time
617

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents