About using FLV video
617
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.cuePoi
" cuePointTime:" + eventObj.cuePoi "}");
}
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
“Media
components (Flash Professional only)” on page 813
. For more information on working with
the FLVPlayback component, see
“FLVPlayback Component (Flash Professional Only)”
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()
method of the FLVPlayback component locates the
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
"part1"
or
"theParty"
).
You can also use the
seekToNextNavCuePoint()
method, which seeks to the next navigation
cue point, based on the current
playheadTime
. You can pass the method a parameter,
time
,
which is the starting time from where to look for the next navigation cue point. The default
value is the current
playheadTime
.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...