June 2010
M T W T F S S
« May    
 123456
78910111213
14151617181920
21222324252627
282930  

Cue Points

First of all i want tell you then actionscript cue points only work in the flash player. You can add or remove cue points in any time in your video.

Please create actionscript 3 new file in flash cs5. And import .f4v file.

cp1

Select to imported video on the stage and on the properties panel you can see cue points
cp2

So in my video i have 3 main points its video about rectangle, circle and star. Now please select the video with rectangle and on the cue points panel add to the ‘+’ button and rename to ‘rectangle’
cp3

Then do the same for circle and for star:
cp4

cp5

Then please create 3 buttons with instance names: rectangle_btn, circle_btn and star_btn
cp6

as you know for write instance name need select component on the stage and on property panel write instance name:
cp7

Also for our video add instance name my_video.

Then please add actionscript 3 code to this project:

rectangle_btn.addEventListener(MouseEvent.CLICK, goToRectangleVideo);
circle_btn.addEventListener(MouseEvent.CLICK, goToCircleVideo);
star_btn.addEventListener(MouseEvent.CLICK, goToStarVideo);

function goToRectangleVideo(event:MouseEvent):void
{
var cuePointInstance:Object = my_video.findCuePoint("rectangle");
my_video.seek(cuePointInstance.time);
}

function goToCircleVideo(event:MouseEvent):void
{
var cuePointInstance:Object = my_video.findCuePoint("circle");
my_video.seek(cuePointInstance.time);
}

function goToStarVideo(event:MouseEvent):void
{
var cuePointInstance:Object = my_video.findCuePoint("star");
my_video.seek(cuePointInstance.time);
}

pc8pc9

So now your cue points is ready. After compilation you can see your video playing and you can use your buttons.
Please download Cue Points source files and enjoy!

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>