Flash video - Cue Points
I've just added some external FLV playback in a project that I am currently completing.
I've currently set my navigation button (next_btn) set to invisible when the page loads (forcing the user to watch the video).
Can I set a cue point in the video to change the state of the next button (i.e. next_btn._visible = true;) ?
you don't need a cuepoint to detect the end of your video. use:
var lo:Object = {};
lo.complete = function(eObj:Object):Void {
next_btn._visible=true;
flv_pb.addEventListener("complete", lo); // <- use the instance name of your flvpb component
Similar Messages
-
Flash Video Cue Points don't work
I used the template sample from Adobe named :Flash video
template: Showcase website for personal video...I followed all the
steps sugested. I used Flash Video Encoder, created the cue points,
worte down the location of those cue points, which I wrote exactly
in the Settings.XML file for each chapter....etc. I guarantee you
that I did it all as sugested...In fact several months ago, it
worked for another project and another videos that I had.
But this time, when I am testing it, the video appears in the
screen all right but when I select a chapter for the section of
that video, an error appears like this :
VideoError: 1003: Invalid seek
at fl.video::VideoPlayer/seek()
at fl.video::FLVPlayback/seek()
at
Video_fla::MainTimeline/chapterClickHandler()[Video_fla.MainTimeline::frame1:184]
VideoError: 1003: Invalid seek
at fl.video::VideoPlayer/seek()
at fl.video::FLVPlayback/seek()
at
Video_fla::MainTimeline/chapterClickHandler()[Video_fla.MainTimeline::frame1:184]
My Settings file has the correspondent locations for each cue
point, like this :
<?xml version="1.0" encoding="utf-8"?>
<showcase>
<!-- Video section #1: Safety Fair 2008 -->
<section>
<title>Safety Fair 2008</title>
<video>video/MOPS_safetyFair.flv</video>
<cuepoints>
<cuepoint>
<title>Fire Department 1</title>
<time>00:00:13.291</time>
<image>img/Gath1.png</image>
<caption>What to do in case of a fire at
home...</caption>
</cuepoint>
<cuepoint>
<title>Fire Department 2</title>
<time>00:01:39.686</time>
<image>img/Poison Center.png</image>
<caption>How to escape from a fire at
home</caption>
</cuepoint>
<cuepoint>
<title>Crime Stoppers</title>
<time>00:01:51.869</time>
<image>img/TxDepTra.png</image>
<caption>Buckle up...</caption>
</cuepoint>
<cuepoint>
<title>Texas Dep of Transportation</title>
<time>00:01:51.869</time>
<image>img/Poison Center.png</image>
<caption>Assistance by phone in case of
emergency...</caption>
</cuepoint>
<cuepoint>
<title>Poison Center</title>
<time>00:02:02.946</time>
<image>img/Gathering3.png</image>
<caption>Mops Gathering at the FLC Picnic
area</caption>
</cuepoint>
<cuepoint>
<title>Fellowship</title>
<time>00:02:09.591</time>
<image>img/Kids-with-Jenny.png</image>
<caption>Nice visit and gathering w/our
children</caption>
</cuepoint>
</cuepoints>
</section>
I have my file structure right as well in each folder IMG and
VIDEO.
What does this error means and how can I correct the
problem.....I have been expending hours trying different ways and
still can't get it to work.
Thanks,
Ednayou don't need a cuepoint to detect the end of your video. use:
var lo:Object = {};
lo.complete = function(eObj:Object):Void {
next_btn._visible=true;
flv_pb.addEventListener("complete", lo); // <- use the instance name of your flvpb component -
Simple Flash Video Cue Point Problem (I assume)
Hello everyone. Quick question. After I have added a cue
point to an end of a video, how can I have the cue point trigger an
action such as "gotoAndPlay" or "fscommand("quit");" etc.?
I thought this would be an easy thing to find by checking on
the various websties for other posts or tutorials but nothing I
found addressed this. Any info will be most appreciated.
Thanks.You don't even need a cuepoint to do this.
Using the FLVComponent or the VideoPlayer object, use the
"complete" event to execute code. You set up an event listener
object to listen to the video object (using
videoobject.addEventListener(listenerObject) ), and create a
function for the listener object to do when the "complete" event
occurs (such as listenerObject.complete = function() { do whatever
Here's a link to a useful pdf about the VideoPlayer object.
http://download.macromedia.com/pub/documentation/en/flash/fl8/VideoPlayer.pdf -
Handling Flash video cue points in Javascript
Can any kind person give me any pointers on how to get Javascript in an HTML page containing an FLV video to listen for cue points in the video? I understand how to get the cue points in, but most people only seem to want to handle the cue point events within Flash. I want to use Javascript to display a different text in a page element at each point. Does the method vary depending on what player you're using? How about when it's the standard Flash playback component? Does there need to be any special Actionscript in the SWF containing the FLV?
Thanks
FredThanks Rob, will do.
For anyone else looking into this issue there are some links to the ActionScript documentation on this StackOverflow post and an explanation of how to use ExternalInterface halfway down the page in this Adobe Devnet tutorial.
Presumably you'd first import the ExtenalInterface class into your Flash with
import flash.external.*;
And then add an ActionScript event listener which sends the ID of each cue point out to the Javascript using the ExternalInterface.call() method:
ExternalInterface.call(methodName:String, [parameter1:Object]) -
Is it possible to jump to a cue point directly when loading a new video?
I have a video for one of my sections on my flash web site and depending on from where the user is coming from, they either start to view at the beginning of the FLV, or at a cue point about 10 seconds in. Is that possible? Would there be any loading issues here? Would it load the 10 seconds, or if told to go to that cue point, would it start to load from that point?
Thanks a lot!try:
var myVideo:Video = new Video();
addChild(myVideo);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
myVideo.attachNetStream(ns);
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
ns.play("video/testFLV.flv");
ns.client = this;
function cuePointHandler(infoObject:Object):void
trace("cuePointHandler called");
trace("infoObject.name: " + infoObject.name); -
After Effects video cue point data error #1107
Hi all,
I'm trying to create a personalised video using the techniques described here: http://www.adobe.com/devnet/flash/articles/atv_personalized_video.html
I have created the video and tracking data in After Effects (CS5), converted the tracking data to Flash cue points and exported the .flv file. I can import the video into Flash (CS6) just fine and I can see all the cue point data however when I try to compile the Flash project, bearing in mind this is just an empty stage with an instance of FLVPlayback on it, I get the following errors:
VerifyError: Error #1107: The ABC data is corrupt, attempt to read out of bounds.
ReferenceError: Error #1065: Variable Icon is not defined.
ReferenceError: Error #1065: Variable FLVPlayback is not defined.
ReferenceError: Error #1065: Variable Main is not defined.
If I export the .flv without the cue point data I can import, compile and play the video without error.
I've had a look around and I've not really been able to find any information about this issue and don't have a clue where to start with it.
Any ideas?!Here is the script I used to export the markers as valid XML for Flash to import. Please note that this will export all markers from all layers so if, as I did, you have multiple 'versions' of your tracking data on different layers it will export the whole lot.
var comp = app.project.activeItem;
var XMLStart = "<?xml version='1.0' encoding='UTF-8' ?><FLVCoreCuePoints>";
var XMLEnd = "</FLVCoreCuePoints>";
var XMLTemp = "";
var XMLFinal = "";
var layerCount = comp.numLayers;
var layer = new Object;
var layerMarkers = new Object;
var markerCount = 0;
var curMarkerTime = 0;
var curMarkerName = "";
var curMarkerType = "";
var curMarkerXML = "";
//Layer markers
for(i=1; i<layerCount+1; i++) {
layer = comp.layer(i);
layerMarkers = layer.marker;
markerCount = layerMarkers.numKeys;
for(j=1; j<markerCount+1; j++) {
// get the parameters for this marker
var params = layerMarkers.keyValue(j).getParameters();
var XMLParam = "";
var cont = false;
// loop through parameters
for(param in params) {
// I added this conditional to strip out markers in my project which were superfluous
if(params[param] == "410,230.5") {
var cont = true;
continue;
// generate the XML for the parameter
XMLParam += "<Parameter>";
XMLParam += "<Name>" + param + "</Name>";
XMLParam += "<Value>" + params[param] + "</Value>";
XMLParam += "</Parameter>";
// if this is a superfluous marker then don't add it to the XML string, just go on to the next
if(cont) {
continue;
// get / set additional marker meta data
curMarkerTime = layerMarkers.keyTime(j) * 1000;
curMarkerName = layerMarkers.keyValue(j).cuePointName;
curMarkerType = "actionscript";
// assemble the full XML element for this cue point
curMarkerXML = "<CuePoint><Time>" + curMarkerTime + "</Time><Type>" + curMarkerType + "</Type><Name>" + curMarkerName + "</Name><Parameters>" + XMLParam + "</Parameters></CuePoint>";
XMLTemp += curMarkerXML;
//Comp markers
var tempText = comp.layers.addText("");
var tempSrc = tempText.text.sourceText;
tempSrc.expression = "thisComp.marker.numKeys";
markerCount = Number(tempSrc.value);
if(markerCount > 0) {
for (i=1; i<=markerCount; i++) {
tempSrc.expression = "thisComp.marker.key(" + i + ").time;";
curMarkerTime = Number(tempSrc.value) * 1000;
tempSrc.expression = "thisComp.marker.key(" + i + ").cuePointName;";
curMarkerName = String(tempSrc.value);
tempSrc.expression = "thisComp.marker.key(" + i + ").eventCuePoint;";
if(tempSrc.value == "true") {
curMarkerType = "event";
} else {
curMarkerType = "navigation";
curMarkerXML = "<CuePoint><Time>" + curMarkerTime + "</Time><Type>" + curMarkerType + "</Type><Name>" + curMarkerName + "</Name></CuePoint>";
XMLTemp += curMarkerXML;
tempText.remove();
//create output string
XMLFinal = XMLStart + XMLTemp + XMLEnd;
//Write file
var cueFile = File.saveDialog("Save the XML file", "XML:*.xml" );
cueFile.open("W");
cueFile.write(XMLFinal);
cueFile.close(); -
I have an FLV loaded into a video player component. The FLV
has embedded cue points, from Flash video encoder:
<mx:VideoDisplay id="vidScreen"
cuePoint="cpHandler(event)" />
And the handler:
private function cpHandler(event:CuePointEvent):void {
Alert.show(event.cuePointName);
It works, since the Alert boxes open on cue and show the name
of the cue point. However, if I try to get the array of cue points
with something like trace(vidScreen.cuePoints) I get null. I need
to get the array, since I want to do something on each of the items
in the array of cue points. What am I missing here?You don't even need a cuepoint to do this.
Using the FLVComponent or the VideoPlayer object, use the
"complete" event to execute code. You set up an event listener
object to listen to the video object (using
videoobject.addEventListener(listenerObject) ), and create a
function for the listener object to do when the "complete" event
occurs (such as listenerObject.complete = function() { do whatever
Here's a link to a useful pdf about the VideoPlayer object.
http://download.macromedia.com/pub/documentation/en/flash/fl8/VideoPlayer.pdf -
Best way to control graphics synchronized to video cue points
Hello,
I've recently completed (well, 'completed' is a strong word)
a phase one implementation of a synchronized video presentation
using After Effects and Flash. The basic idea driving the
synchronization of cue points to motion graphics revolves around
creating a listener in the following fashion:
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
// Put any code you like here
trace("Cue point name: " +
eventObject.info.name);
my_FLVPlybk.addEventListener("cuePoint",
listenerObject);
and then using the cue point name to play a variety of
movieclips at the appropriate time in the presentation.
The video presentation had four sections, each of which could
be arbitratrily browsed to at any point in the presentation, so it
was important that the the movieclips did not need to play in order
and that they could be interrupted at any point without an visual
confusion.
I dealt with this two ways (I am sure these are not the best
ways, which is why I am writing this post):
First, every single movieclip was already on the stage from
the outset, stopped on the first frame, with the alpha property set
to 0 (based on Aran Balkan
http://aralbalkan.com/444).
The final frame of each clip had a gotoAndStop(1) action on it so
that when a clip finished playing it 'reset' itself. I also wrote a
"rewind" function which pretty much did the same
thing whenever a user clicked on one of the navigational tabs.
For a first iteration, this worked pretty well, and it
impressed enough people in my organization (university) that now
the President wants to deliver a similar message. It seemed prudent
at this point to ask a general question about best practices in
this area. I am working with the full Master Collection suite, and
can target later versions of the Flash Player (I believe I can use
AS 3.0, although I will have to learn it). One thing that I am
hoping any pointers you guys might have will cover is this:
How do you handle starting/stopping/pausing of the video and
also make sure any currently playing graphical assets also
start/stop/pause on cue? I was thinking of setting a variable on
the second frame of each movieclip, something along the lines of
'nowPlaying = this;' and then resetting that to null at the end of
the clip and in the rewind function, then using that variable to
control the currently playing clip (would have to bu just one, I
imagine).
But there has got to be a better way. I have some down time
to do research and to experiment, but it is going to be very high
profile when it rolls around, so I thought I'd send out some
feelers.
Has anyone done anything like this? Seen a better way? Etc .
Thanks so much.Best practice is to keep one single file as long as humanly possible.
In this case, you "branched" a version for another format; I'd suggest you don't edit that any further (apart from the formatting stuff you mentioned), but inform your client this version is to be worked on. Work on your "real" version until it's really really done, and only then make other versions.
It's a different story (no pun intended) if the transition between the two versions can be automated; that way you'd still only work on the 'real' version, but then you could generate the other with every edit you make -- you should still not be doing any work in the dumbed-down version. -
Synchronize flash video navigation points with slides
Hello,
i'll have to sync different slides with a captured presentation. i know i can set navigation points in my flash-video. but i haven't found a solution to change the slides when the video reached a certain point. is this possible with indesign? it would be fantastic.
regards,
marekThank you Jamesabth and GenaroRG for your responses. Someone
in the
flashcom newsgroup pointed out
http://flowplayer.org/. This
looks like
exactly what I've been looking for. I'll give it a try first.
Thanks,
Mickey
"Mickey" <[email protected]> wrote in
message
news:fk4krg$ca5$[email protected]..
> Is it possible to load navigation cue points from an xml
file like you can
> do with captions or do they always have to be embedded
in the encoding?
>
> If it's possible, can you PLEASE point me to a resource
that shows you
> how? I've searched and searched for weeks and found
nothing!
>
> Thanks,
> Mickey
> -
Video cue point events, or similar?
Hi,
In flex, the video GUI control has something called "cue points" -- you can get event callbacks when video playback hits time points of your choosing. This allows you to synchronize the video with other parts of your GUI. Is there something in JavaFX that allows the same thing? If not, are there plans to have it? When?
thanks,
RobYou don't even need a cuepoint to do this.
Using the FLVComponent or the VideoPlayer object, use the
"complete" event to execute code. You set up an event listener
object to listen to the video object (using
videoobject.addEventListener(listenerObject) ), and create a
function for the listener object to do when the "complete" event
occurs (such as listenerObject.complete = function() { do whatever
Here's a link to a useful pdf about the VideoPlayer object.
http://download.macromedia.com/pub/documentation/en/flash/fl8/VideoPlayer.pdf -
Need several buttons that each target a video cue point but only one works
I have the code that works for one button to find a cue point but how can I make this work for several buttons and their respective cue points?
"seek-btn2" to find cue 2(named "lou2")
import fl.video.*;
// Video component instance name
var flvControl:FLVPlayback = display;
var flvSource:String = "lou.flv";
// Set video
flvControl.source = flvSource;
// Add seek functionality to the button
function seekHandler(event:MouseEvent):void
flvControl.seekToNavCuePoint("lou1")
//seek_btn is the button instance name
seek_btn.addEventListener(MouseEvent.CLICK, seekHandler);
when i repeat the last part of the code it does not work, thanks for your time....Thanks but where would I insert that code and what would I take out from the original code I posted?
i tried this....
import fl.video.*;
// Video component instance name
var flvControl:FLVPlayback = display;
var flvSource:String = "lou.flv";
// Set video
flvControl.source = flvSource;
seek_btn1.cuePointName = new String();
seek_btn1.cuePointName = "lou1";
seek_btn1.addEventListener(MouseEvent.CLICK, onButtonPress);
seek_btn2.cuePointName = new String();
seek_btn2.cuePointName = "lou2";
seek_btn2.addEventListener(MouseEvent.CLICK, onButtonPress);
// onButtonPress function
private function onButtonPress(evt:MouseEvent):void {
flvControl.seekToNavCuePoint(evt.target.cuePointName); -
Video cue point navigation please help
OK I need major help here. I am trying to get a video to
stream and show pictures that are cued to the video playing. The
thing is I need to have a next and prev btn for the pictures and
the video to go to the next and previous cue points. The cue points
are inbedded in the FLV. Please helpbefore the function add the following line:
import fl.video.MetadataEvent; -
How to sync image slides to video cue points?
Hi, I'm working in AS3. What is the best way to sync some
image slides to cue points I have embedded in a video? Ideally the
video would play and and the image will change according to the cue
points.Hi there.
I encountered that same question just recently. Here's what I
did:
First, import your video, choosing to load an external video
w/ FLYPlayback componant. Name it "vid". The video should already
your embedded cue points. In this case, the cue points are called
"Slide 1", "Slide 2" etc.
Next, bring a UILoader componant to the stage and name it
"myLoader"
Specify where your images are (in "myImageHere") and away you
go my friend.
Here is the code:
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
import fl.video.MetadataEvent;
import fl.containers.UILoader;
vid.addEventListener(MetadataEvent.CUE_POINT, cueSlide);
function cueSlide(e:MetadataEvent):void {
var cuePointName=e.info.name;
if (cuePointName=="Slide 1") {
myLoader.source="yourImageHere1.jpg";
} else if (cuePointName == "Slide 2") {
myLoader.source="yourImageHere2.jpg";
} else if (cuePointName == "Slide 3") {
myLoader.source="yourImageHere2.jpg";
} -
Control slide advance via video cue points
Hi Folks I would like to have a video clip control the advance of an external slideshow by using cue points set in the video. Idealy I would have 2 swfs (video.swf and slides.swf) embeded in a web page side by side and as the video reaches a certain cuepoints it advances the slides in the slideshow swf. It would also be good to fullscreen either one or the other as required.
Any help appreciated.
Dave.Hi Folks I would like to have a video clip control the advance of an external slideshow by using cue points set in the video.
The videos do not need to be live streamed and can be prepared with keyframes at the key positions for slide advance
So is it keyframes or cuepoints? I didn`t say sth. of Livestream either.
Streaming means simply the process where a video can already start even if its not already completely loaded. This is consideres not only good but standard practice nowadays.
Embedding videos on the timeline is a bad idea. Using Keyframes in this case is an even worse idea. -
Bringing up a button and an image using video cue points
Hi,
I have a 4:40 long video and I'd like to show a button and a background image (or a movie clip) at 4:30 and I want them stay on the screen after the video is complete. If someone could give me a step by step instructions for this I'd really appreciate it. By the way I use Flash CS5.
Have a great day!
VeliSorry if I confused you. Here's a little sample video I'd like to show you (only 10 seconds), so I can explain it more clearly. This is exactly the same thing except it is 10 seconds instead of 5 minutes.
http://www.relationsmith.com/hhosp/slideshow/jan12/slideshow.html
In this project I have 6 layers (from top to bottom); action, replay, button, bg, frame, video. The video plays and the button (btn1) comes up at 7, then the video ends and replay button comes up. So far so good.
When I hit replay button to watch the video again, the video starts to play but this time the video is on the top of everything. I cant see the blue frame, at the 7th second the button activates but is hidden behind the video, and so is the replay button. I think the answer lies in this code:
function replay(e:MouseEvent):void {
addChild(flv_pb);
flv_pb.play();
You said this code "addChild(flv_pb);" would put the video on the top of everything. So I was wondering if there is a way to play the video without having it at the top most depth. I'm pasting the entire code for your reference.
Thanks!
import fl.video.MetadataEvent;
replay_btn.visible=false;
btn1.visible=false;
flv_pb.addASCuePoint(7,"show");
flv_pb.addEventListener(MetadataEvent.CUE_POINT,cuepointF);
flv_pb.addEventListener(Event.COMPLETE,completeF);
btn1.addEventListener(MouseEvent.CLICK, clickButton);
replay_btn.addEventListener(MouseEvent.CLICK, replay);
function completeF(e:Event):void{
replay_btn.visible=true;
function replay(e:MouseEvent):void {
addChild(flv_pb); // moves flv_pb to the top most depth
flv_pb.play();
function cuepointF(e:MetadataEvent):void{
if(e.info.name=="show"){
bg.play()
btn1.visible=true;
var myURL:URLRequest=new URLRequest("http://www.ctwolfpackyouth.org/");
function clickButton(myevent:MouseEvent):void {
navigateToURL(myURL);
Maybe you are looking for
-
SAP B1 8.81 Client Installation on Windows 7
Hello, Having trouble installing SAP B1 8.81 PL04 on a Windows 7 Professional client PC, works fine on Windows XP clients. Error Code: " SAP business One DI API error 1303 insufficient privileges to access this directory: C:\Program Files (x86)\SAP"
-
Nokia 2730 classic no longer sync-ing with Nokia s...
Both phone and suite run in Italian, PC has windows 7, Italian, Contacts were synchronizing with no problems. Apparently nothing changed, then I started getting the error code 80040002 8d5e00a I did all what was suggested: restart PC and phone, look
-
Adobe Reader 11.0 (AcroRd32) does not close
Hi, I am using CL_GUI_FRONTEND_SERVICES=>Execute method to print PDF form in foreground passing '/t' as parameter. Once executed the Adobe Reader opens and then the file opens and close and go to printer but the Adobe Reader remains open and does not
-
Can anybody Help me , my Mac was working great til i decided to update to OS X Mavericks and i ran the update and since then my Safari is crashing all the time and freezing too, i had to download opera which is working fine , and the update thunderbo
-
Viewing Mobile vs. Desktop visits.
I have recently launched both a mobile and desktop versions of a website. How can I use the statistics feature of BC to view how many mobile visits I have had compared to desktop visits? I know how to view differences in opperating systems and brow