Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Flv Cuepoints



Hi Folks

Stuck on the last bit

I am using an xml document to load in cue point times and there frames into an array but I am unable to load in the latestIndex number so that it goes to the correct frame in the MC how can i do this.

heres my script so far

xml code

Code:
<xmlcuepoints>
<qpoint time="07950" frame="2" />
<qpoint time="15939" frame="18" />
<qpoint time="30550" frame="34" />
<qpoint time="42505" frame="76" />
<qpoint time="0101783" frame="259" />
<qpoint time="0109069" frame="324" />
<qpoint time="0121690" frame="389" />
<qpoint time="0137630" frame="451" />
<qpoint time="0235411" frame="554" />
<qpoint time="0241388" frame="619" />
<qpoint time="0246701" frame="684" />
<qpoint time="0309283" frame="749" />
</xmlcuepoints>




Code:
var my_xml = new XML();
var cueTimes:Array = new Array();// cuepoint time
var cueFrames:Array = new Array();//MC frame
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
my_video.attachVideo(ns);
ns.onCuePoint = cuePointHandler;
ns.setBufferTime(20);
ns.play("Comhairle 02 Untitled.flv");
//
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
if (success) {
setCues();
} else {
trace("Error - Not Loaded");
}
};
//FLV cue points
function setCues() {
for (n = 0; n < my_xml.firstChild.childNodes.length; n++) {
var info:Object = new Object();
info.time = my_xml.firstChild.childNodes[n].attributes.time;
cueTimes.push(my_xml.firstChild.childNodes[n].attributes.time);
info.name = my_xml.firstChild.childNodes[n].attributes.frame;
cueFrames.push(my_xml.firstChild.childNodes[n].attributes.frame);
my_video.addCuePoint(info);
/*trace("info " + (n+1));
trace("Time: " + my_xml.firstChild.childNodes[n].attributes.time);
trace("Frame: " + my_xml.firstChild.childNodes[n].attributes.frame);
trace("-------------");*/
}
}
my_xml.load("timecodeold.xml");
//
ns.cuePoint = function(info:Object):Void {
for (i = 0; i < my_xml.firstChild.childNodes.length; i++) {
switch (info.parameters.title) {
case "frame" + i :
maintitle.gotoAndPlay("frame" + i);
break;
}
}
};
my_video.addEventListener("cuePoint", ns);
//
function cuePointHandler(info:Object) {
if (info.parameters.title == "Comhairle mu Dheasbad") {
maintitledea.gotoAndPlay("labelA");
}
if (info.parameters.title == "Brìgh") {
maintitle.gotoAndPlay("labelB");
maintitledea.gotoAndPlay("close");
}
if (info.parameters.title == "Stoidhle") {
maintitle.gotoAndPlay("labelC");
}
if (info.parameters.title == "Èifeachdas") {
maintitle.gotoAndPlay("labelD");
}
if (info.parameters.title == "Seonaidh Ailig Mac a' Phearsain") {
maintitle.gotoAndPlay("labelE");
}
if (info.parameters.title == "Dòmhnall Màrtainn") {
maintitle.gotoAndPlay("labelF");
}
if (info.parameters.title == "Cleachd props a tha iomchaidh") {
maintitle.gotoAndPlay("labelG");
}
if (info.parameters.title == "Cleachd cairtean") {
maintitle.gotoAndPlay("labelH");
}
if (info.parameters.title == "Feumaidh sibh a bhith mothachail...") {
maintitle.gotoAndPlay("labelI");
}
if (info.parameters.title == "agus luath ann an smaoineachadh") {
maintitle.gotoAndPlay("labelJ");
}
if (info.parameters.title == "Feumaidh sibh ullachadh math a dhèanamh") {
maintitle.gotoAndPlay("labelK");
}
if (info.parameters.title == "Thoiribh taic dha chèile") {
maintitle.gotoAndPlay("labelL");
}
if (info.parameters.com == "Complete") {
nametitle.vtitle_txt.text = "";
maintitledea.gotoAndPlay("close");
}
}
//
nametitle.vtitle_txt.text = "";
//
playButton.onRelease = function() {
if (playButton._currentframe == 1) {
playButton.gotoAndStop(2);
replay.gotoAndPlay(2);
ns.pause();
} else {
playButton.gotoAndStop(1);
ns.pause();
}
};
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded:Number;
var duration:Number;
ns["onMetaData"] = function (obj) {
duration = obj.duration;
};
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 300;
loader.scrub._x = ns.time / duration * 300;
}
var scrubInterval;
loader.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit, 10);
maintitle.gotoAndPlay("frame" + i);
this.startDrag(false, 3, this._y, 293, this._y);
};
loader.scrub.onRelease = loader.scrub.onReleaseOutside = function () {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus, 100);
this.stopDrag();
};
function scrubit() {
ns.seek(Math.floor((loader.scrub._x / 286) * duration));
}
//
loader.scrub.onMouseUp = function() {
currentTime = my_video.playheadTime;
for (i=0;i<cueTimes.length;i++) {
if (currentTime >= cueTimes[i]) {
latestIndex = i;
}
}
trace("Time = " + cueTimes + "Frame = " + cueFrames);
//how to load in the latestIndex number to call the correct frame in the cueFrames array and load it where you need it????
}
//



FlashKit > Flash Help > Flash ActionScript
Posted on: 01-24-2008, 12:25 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

FLV Cuepoints - Load External Images And Cuepoints From XML
I am trying to load external images based on FLV cuepoints.

I have videos of speakers and want to sync their slide images on the stage with the video.

Ideally I'd like to load my images and the cuepoints from an XML file. I've done this with captions, but can't figure out how to do it with images.

Here's the file I used for captions.
http://chrisbutts.com/test/imageTest.zip

Using Cuepoints
Hi
I am trying to do some proggressive downloading of a video fla
in flash. Its a new way for me and I am still unsure how to target
specific cue points which have been anchored to specific frames in the movie.
i need some AS asisstance all i want to do is when the video being downloaded has reached its specific frame (i.e. the last one with the cue point on it) to tell the movieclip it is contained in on the main timeline to go and play the next frame.. any help on this would be so useful!
Thanks
j

CuePoints If-Then-Else Help
Ok. I think I am close so I'd appreciate any help from an AS guru to close the gap here!

I have a script (below) that resides on frame 1108 of the timeline and a .flv file with embedded cuepoints that is streaming. There are visuals in the .fla that need to sync with the .flv. SOOOO, here is what I have done:


Code:
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
if (eventObject.info.name != organic)
{
gotoAndPlay(1109);
}
else
{
gotoAndPlay(1100);
}

}

my_FLVPlybk.addEventListener("cuePoint", listenerObject);
The thought is that the movie will hang around between 1100 and 1108 until it hits the cuepoint named organic and then move forward (keeping it in sync with the visuals). It should also be noted that there is an audio track playing so I cannot stop(); the timeline without stopping the music.

I'm sure I may have a syntax issue here, but the AS editor is not flagging anything. All advice and assistance is appreciated!!

-- Matt

Cuepoints
Dear Flash Gurus

How can I access all cuepoints at once, as an array or in whichever format they are stored? I need to get a list of all cuepoints with their positions when the flv file has finished loading, or when it starts loading. ... whichever.

I've tried to use the onMetaData function but it doesn't appear to be able to read the cuepoints.

---------------------------------------------------------------------
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
myvideo.attachVideo(ns);
ns.play("testmovie.flv");

ns.onMetaData = function(infoObject:Object) {
for (var propName:String in infoObject) {
trace(propName + " = " + infoObject[propName]);
}
};


----------------
But I get only the following traces... all cuepoints are undefined?:

canSeekToEnd = true
cuePoints = undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined
audiocodecid = 2
audiodelay = 0.038
audiodatarate = 96
videocodecid = 4
framerate = 29.9699859619141
videodatarate = 400
height = 240
width = 360
duration = 227.46

-------------------------------

any ideas on how to get all those cuepoint information?

Any insight or leads appreciated.

Thanks

stephan

CuePoints
hello everybody,

i have a flv that has about 20 cue points, and one of the required controls of this player is to have a rewind button that can go back a step.

my question is, when the user clicks my rewind button, how do i tell the video to go back and play from the previous cuePoint? i want to be able to tell the video to play from the previous cue point much like we tell a movie clip to play the previous frame with: gotoAndPlay(_currentframe-1);

thanks!

Cuepoints Over 100
Hi
I'm trying to control the flv files using xml.
The format for setting cuepoints normally is 00.00.00.000
However action script requires you enter a number so the above is not allowed. You can use 00.000 i.e. up to 99.999 however when you reach 100.000 it stops working.
I noticed someone had the same query last year so I'm hoping that someone has found a workaround since then!

FLV CuePoints
I am using Flash CS3 to create a presentation using video. When I created the FLV I added cue points at specific points in the video where I want the video to pause. Once the video is paused the person giving the presentation can then hit a key on the keyboard to resume the video. I posted this question a day or so ago but did a terrible job explaining what I was trying to achieve. Here is the code I have written so far:







Attach Code

// first I imported what I thought I needed, NetStream and FLVPlayback
// however I think I have to use one or the other, not sure which one is best
// and realize the code used will be dependent on which I method I use
import flash.net.NetStream;
import fl.video.FLVPlayback;
//not sure if I need this for pressing a key on the keyboard, so I added it anyway
import flash.events.KeyboardEvent;

//using the FLVPlayback I am able to get the video on the stage
//I'm not using any type of streaming server stuff.
//I will eventually create an .exe and play on a laptop for a presentation
var vid:FLVPlayback = new FLVPlayback();
vid.source = "cuepoints.flv";
addChild(vid);

//no problem here, this is where I want the video on the stage
vid.x = 50;
vid.y = 50;

//i'm not sure what type of event will address the video which
//my variable name is vid (which is "cuepoints.flv"
//the name of the cue point I want the video to stop on is "01" and
//am pretty sure this should be a string
//I'm not at all sure if any of this syntax is in the right place
stage.addEventListener(event.onCuePoint, vid, "01");

//I think I'm on the right track but I'm trying to figure out
//how to make it so when I press the right arrow it would run the
//function resumeVideo (which I haven't written the correct function for)
stage.addEventListener(KeyboardEvent.KEY_DOWN, resumeVideo);

//what do I call to make the FLV stop on a cue point which I named "01"
//I was told onCuePoint doens't work with FLVPlayback but does with NetStream
function pauseVideo(??????????):void
{
//this isn't working
vid.pause();
}
//function resumeVideo(event:KeyboardEvent):void
{
//this isn't working
vid.resume();
}

FLV & CuePoints
This is driving me absolutely nuts!

I have a Flash movie with the media display component on several frames. Basically on each frame it loads a different flv file. I have devined cuepoints through the component inspector. What I'd like to happen seems quite simple but I am really confused I guess.

When the flv gets to the cuepoint "end", I'd like for the movie to gotoAndStop on the next frame.

Can someone please help????

FLV & CuePoints
This is driving me absolutely nuts!

I have a Flash movie with the media display component on several frames. Basically on each frame it loads a different flv file. I have devined cuepoints through the component inspector. What I'd like to happen seems quite simple but I am really confused I guess.

When the flv gets to the cuepoint "end", I'd like for the movie to gotoAndStop on the next frame.

Can someone please help????

ComboBox To Nav MC And CuePoints
Since I believe my problem rests more with AS rather than controlling video I figured I might get some help in this forum. Here's my prob:

Has anyone used a comboBox to navigate cuePoints simultaneously with controlling a movieClip? I stripped out the slides from a ppt and placed them on a single timeline in their own movie clip with named frames, which are the same names as the cue points. So when the user makes a selection from the comboBox the flv should navigate to the desired cuePoint as well as navigate to the correct frame in the movieClip. This works when I navigate to a cuePoint which occurs after the current cuePoint I'm viewing, but this WILL NOT work when I navigate to a cuePoint that occurred previously. What happens when this doesn't work is that the cuePoint is successfully navigated to, but the movieClip briefly navigates to the correct frame, but then regresses to the frame it was previously on. The comboBox also flips back to the previous index point it was on. I've rebuilt my fla using the MM presentation templates as well as hard coding the cuePoint/movieClip navigatonal relationships myself to no avail. I've attached my script for review. Help?!

How To Load Cuepoints?
Hi,

I have a flv player and some buttons that work with cuepoints.

What I want to do is,

when buffering of the specific cuepoint is not completed, the button belongs to that cuepoint becomes passive.

thank you so much.

file is attached

Anyone Know A Few Things About Cuepoints?
Hello people,
So here is the task at hand. I have a flvPlayBack component playing a movie. Lets say the movie is 1:18 seconds long. At the end of the movie I need it to make a movie clip, with an instance name "menu", visible again.
Using this script. menu._visible = true; (yeah I know duhh... obviously)

If anyone can help me with this it will be more then greatly appreciated.

Thanks
- Pamela

AS3 Video Cuepoints
Hi,

I am working on an AS3 project using Flex Builder and I am trying to find out how to add cuepoints to a video instance with a script.

If this was a Flex project I believe I should use mx.controls.videoClasses.CuePointManager but that one does not exist for AS3 projects.

How should I do this? Is it at all possible?

If not, can you recommend any software that is good for adding subtitles in multiple languages as cuepoints?

[F8] Specifying More Accurate Cuepoints?
Hey all,
Im trying to call a function at certains beats in an mp3. To do this I want to use cue points and to type them manually for control. However, I cant get the timing more accurate than in seconds using actionscript, it doesnt seem to understand sat 2.5 as opposed to 2. Maybe the syntax is wrong? This is the code I am using to do it.


var aCuePoints:Array = [{cue:3, msg:"Cue point 1"},
{cue:5, msg:"Cue point 2"},
{cue:7, msg:"Cue point 3"},
{cue:9, msg:"Cue point 4"}
]

var sndMusic:Sound = new Sound();
sndMusic.loadSound("Neverending.mp3", true);

var nCuePointCheck:Number = setInterval(checkCue, 1000);

function checkCue():Void{
for(var i:Number=0; i<aCuePoints.length; i++){
if(aCuePoints[i].cue == Math.floor(sndMusic.position/1000)){
trace(aCuePoints[i].msg);
break;
}

}
}

As you can see the cue points are at 3, 5, 7 seconds etc but i need them inbetween.

Any help would be MUCH appreciated!
I dont know any XML either and embedding them into the movie makes them difficult to alter.

FLVPlayBack Cuepoints?
Hey..

I have an FLVPlayback component on my stage, and I have a movie attached via the parameters menu. I have also add a cuePoint called "End" via the parameters menu of the component.

I am looking to have the FLV stop and hold its last frame when it reaches the "End" cuepoint. I've been searching, but can't find a good tutorial on this anywhere...

Any help is greatly appreciated!


Thanks!

[CS3] Cuepoints Or FLV In Sections?
Hi,

I'm reasonably new to this, so have one main question about best practice with video, and some other minor things

I was wondering if someone could tell me the best way to link an flv file to slides - should I spend the time encoding each section of video that corresponds to a slide as separate flv files (from iMovie) and call on each of these files, or should I encode the whole video as an flv with embedded cuepoints and link to the cuepoints? The video is about an hour long ( a seminar) so may be quite a large file. I would like a recommendation, as I think both ways would work, but which would be better?

Also, I noticed encoding to flv from iMovie on Mono sound produces no sound at all, but is fine with stereo, and have read on other forums that it's the sample rate - should be on 44.1Khz - causing the problem due to a bug in flash 8, but has anyone heard whether this is right? As there isn't a way to choose sample rate in the audio section of flash video encoding, only data rate?

Sorry for rambling, only one more thing....

Has anyone else noticed a drastic increase in encoding time with the flv export component from iMovie when upgrading to CS3? For example, I'm going back to chopping up my video after the upgrade, and a 20second clip is telling me it'll take 45 mins to encode, when I'm sure it was only about 10 mins with flash 8? I don't think anything else has changed (settings etc.)

Any help or advice would be greatly appreciated.

Thanks,
Emma

Audio Cuepoints In CS4?
Hi,

I am trying to put audio in my flash piece, it's some kind of narration. It's sort of a voice over (about 2 mins) that suppose to accompany some minor animations (about 3 or 4 animations). Thus I want to be able to sync certain parts of the audio with my animation without having to stretch to full timeline; so I think the solution is using cuepoints.

Does anyone know how to do it? I heard using Adobe Soundbooth you can add cuepoints (marker) on your audio timeline and a type of audio format is compatible with Flash CS4. But I could not find a good literature on it on the web. Does any other audio format such as .aiff works with cuepoints?

And does Flash/actionscript have anything to read these cuepoints/markers?

I am trying to avoind using numerical cuepoints (the one you have to type in the milisecond) as it is sort of finnicky.

Havent found much topic on this, so any help is appreciated.

Jeff

Actionscript Cuepoints
Hey all,

I'm attempting to create cuepoints for my FLV through AS. Specifically, I want to send a trace when the FLV playhead reaches 5 seconds. What I have so far is:


Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
myVideo.attachVideo(ns);
ns.play("myvideo.flv");

ns.addCuePoint("Point1",5);

var myCuePointListener = new Object();
myCuePointListener.cuePoint = function(eventObject){
trace("heard " + eventObject.type + ", " + eventObject.target);
}

ns.addEventListener("cuePoint", myCuePointListener);


stop();
The video is playing correctly, but I'm not getting the trace at 5 seconds. Can anyone spot a problem with my code? Thanks for any help.

Luke

XML Cuepoints In MP3s?
Does anyone know of any good tutorials or resources on using XML cuepoints with MP3s? I've got a subtitle app. for FLV working but I can't make it work with MP3. I think the FLV Component sends MetadataEvents but MP3s don't. There's probably an easy way to listen for MP3 cuepoints but I can't work it out.

By the way, cuepoint data is basically timed points in milliseconds. Here's an example XML file:


HTML Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<FLVCoreCuePoints Version="1">

<CuePoint>
<Time>9</Time>
<Type>event</Type>
<Name>Where are you from?</Name>
</CuePoint>

<CuePoint>
<Time>1104</Time>
<Type>event</Type>
<Name>What do you do?</Name>
</CuePoint>

<CuePoint>
<Time>2088</Time>
<Type>event</Type>
<Name>How old are you?</Name>
</CuePoint>

</FLVCoreCuePoints>
Any help or links would be greatly appreciated. Thanks in advance!

Cuepoints Question
I'm a noobie when it comes to CS3. I have a script (found online) that uses an xml file to add subtitles to a video embedded in an fla file. It works great until the video gets to the 1 minute mark, then the cuepoints don't work anymore.
Here's a snippet of the xml file


HTML Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<cuepoints flvName="videoname.flv">
<cuepoint >
<cuename>cue_point_0</cuename>
<cuetime>.5</cuetime>
<subtitle>First text here</subtitle>
</cuepoint>
<cuepoint>
<cuename>cue_point_1</cuename>
<cuetime>12.0</cuetime>
<subtitle>More stuff here.<subtitle>
</cuepoint>
<cuepoint>
<cuename>cue_point_2</cuename>
<cuetime>18.1</cuetime>
<subtitle>Still more stuff<subtitle>
</cuepoint>
/.../
<cuepoint>
<cuename>cue_point_10</cuename>
<cuetime>64</cuetime>
<subtitle>Even more stuff<subtitle>
</cuepoint>

</cuepoints>
I've tried using 104 and 1.04 (which I know is wrong anyway) for the cuetime as well as 64 but no dice. Any suggestions?

Audio Cuepoints In CS4?
Hi,

I am trying to put audio in my flash piece, it's some kind of narration. It's sort of a voice over (about 2 mins) that suppose to accompany some minor animations (about 3 or 4 animations). Thus I want to be able to sync certain parts of the audio with my animation without having to stretch to full timeline; so I think the solution is using cuepoints.

Does anyone know how to do it? I heard using Adobe Soundbooth you can add cuepoints (marker) on your audio timeline and a type of audio format is compatible with Flash CS4. But I could not find a good literature on it on the web. Does any other audio format such as .aiff works with cuepoints?

And does Flash/actionscript have anything to read these cuepoints/markers?

I am trying to avoind using numerical cuepoints (the one you have to type in the milisecond) as it is sort of finnicky.

Havent found much topic on this, so any help is appreciated.

Jeff

Actionscript Cuepoints
Hey Guys,

I'm using FLVplayback and Actionscript cue points, no embedded cue points in the FLV. I will be changing the actionscript cue points from time to time, but I still need a button to advance through the cue points and back, so I can't use seekToNextNavCuePoint(). Any help would be greatly appreciated. Thanks!

Cuepoints - Usage?
Dear List

I'm looking into my options on the achieving the following:

1) A progressive download of an .flv file (we don't have media server, otherwhise we'd stream).
2) Once whole file is downloaded display all the cuepoints in the flv file on the timeline (with some sort of markers)
3) Markers get actionscript that when you click on them the movie seeks to this marker point and continues playing from there

It seems like I can get everything working besides obtaining the cuepoints information. So far the only way of getting cuepoint information is by playing back the entire video in real time, which is very unpractical. I've tried using the onMetaData function but I get no information on the cuepoints, just an array of undefined elements. something like this:

------------------------------------------------
canSeekToEnd = true
cuePoints = undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined
audiocodecid = 2
audiodelay = 0.038
audiodatarate = 96
videocodecid = 4
framerate = 29.9699859619141
videodatarate = 400
height = 240
width = 360
duration = 227.46
---------------------------------------------------------

All this information is great, but yes the cuepoints are missing, or am I missing something? It seems like the cuepoint sare stored in an array, but why are its elemens undefined?

Is this possible at all? Or do we need the media server for this?

Any other way of getting the information? Is there a cuepoints property that is undocumented?

Any help appreciated.

Thank you very much.

Best Regards

Stephan

Cuepoints - Usage?
Dear List

I'm looking into my options on the achieving the following:

1) A progressive download of an .flv file (we don't have media server, otherwhise we'd stream).
2) Once whole file is downloaded display all the cuepoints in the flv file on the timeline (with some sort of markers)
3) Markers get actionscript that when you click on them the movie seeks to this marker point and continues playing from there

It seems like I can get everything working besides obtaining the cuepoints information. So far the only way of getting cuepoint information is by playing back the entire video in real time, which is very unpractical. I've tried using the onMetaData function but I get no information on the cuepoints, just an array of undefined elements. something like this:

------------------------------------------------
canSeekToEnd = true
cuePoints = undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined
audiocodecid = 2
audiodelay = 0.038
audiodatarate = 96
videocodecid = 4
framerate = 29.9699859619141
videodatarate = 400
height = 240
width = 360
duration = 227.46
---------------------------------------------------------

All this information is great, but yes the cuepoints are missing, or am I missing something? It seems like the cuepoint sare stored in an array, but why are its elemens undefined?

Is this possible at all? Or do we need the media server for this?

Any other way of getting the information? Is there a cuepoints property that is undocumented?

Any help appreciated.

Thank you very much.

Best Regards

Stephan

Where Do I Go From Here - FLV Component Cuepoints
Hello,
I am still having trouble with cue points. I don't know what I'm supposed to put in the component inspector area...I just have four cuepoints named slide2a, slide2b, slide2c, and slide2d. I have corresponding movieclips with the same instance names. I want the movieclips to play when the video reaches a certain time. Pleaaaase help???

Here is what I have so far....


//
/**
FLV variables
*/
import mx.video.*;
my_FLVPlybk.playPauseButton = my_plypausbttn;
my_FLVPlybk.forwardButton = nextbtn;
my_FLVPlybk.backButton = backbtn;
// listeners for the play/pause, next, and back buttons
//
var listenerObject:Object = new Object();
listenerObject.stateChange = function(eventObject:Object) {
if (my_FLVPlybk.paused)
(mcs[currentSlide]).stop();
};
my_FLVPlybk.addEventListener("stateChange", listenerObject);
//
// listener for next button pressed
//
var listenerObject:Object = new Object();
listenerObject.slideNext = function(eventObject:Object) {
if (nextbtn.press)
(mcs[nextSlide]).gotoAndPlay(2);
};
my_FLVPlybk.addEventListener("slideNext", listenerObject);
//
// listener for back button pressed
//
var listenerObject:Object = new Object();
listenerObject.slideBack = function(eventObject:Object) {
if (backbtn.press)
(mcs[previousSlide]).gotoAndPlay(2);
};
my_FLVPlybk.addEventListener("slideBack", listenerObject);
//
//movieclip array and cue point created
//
var mcs:Array = new Array(slide2a, slide2b, slide2c, slide2d);
var currentSlide:Number = 0;
var listener:Object = new Object();
listener.cuePoint = function(evt:Object):Void {
trace(mcs[currentSlide]);
currentSlide++;
}
videoPlayer.addEventListener("cuePoint", listener);
stop();

Thanks for any help!!

FLVPlayback CuePoints
I have an FLV encoded with six cuePoints (introOne, introTwo, introThree, introFour, introFive, introSix). When the first cue point is fired, all my movie clips play at once instead of on cue. Forgive my ignorance. Any help? Thanks in advance.







Attach Code

var introOne:Object = new Object();
introOne.cuePoint = function(evt:Object) {
overlayIntro1.play();
};
player.addEventListener("cuePoint",introOne);

var introTwo:Object = new Object();
introTwo.cuePoint = function(evt:Object) {
overlayIntro2.play();
};
player.addEventListener("cuePoint",introTwo);

var introThree:Object = new Object();
introThree.cuePoint = function(evt:Object) {
overlayIntro3.play();
};
player.addEventListener("cuePoint",introThree);

var introFour:Object = new Object();
introFour.cuePoint = function(evt:Object) {
overlayIntro4.play();
};
player.addEventListener("cuePoint",introFour);

var introFive:Object = new Object();
introFive.cuePoint = function(evt:Object) {
overlayIntro5.play();
};
player.addEventListener("cuePoint",introFive);

var introSix:Object = new Object();
introSix.cuePoint = function(evt:Object) {
overlayIntro6.play();
};
player.addEventListener("cuePoint",introSix);

Cuepoints Usage?
Dear List

I'm looking into my options on the achieving the following:

1) A progressive download of an .flv file (we don't have media server, otherwhise we'd stream).
2) Once whole file is downloaded display all the cuepoints in the flv file on the timeline (with some sort of markers)
3) Markers get actionscript that when you click on them the movie seeks to this marker point and continues playing from there

It seems like I can get everything working besides obtaining the cuepoints information. So far the only way of getting cuepoint information is by playing back the entire video in real time, which is very unpractical. I've tried using the onMetaData function but I get no information on the cuepoints, just an array of undefined elements. something like this:

------------------------------------------------
canSeekToEnd = true
cuePoints = undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined
audiocodecid = 2
audiodelay = 0.038
audiodatarate = 96
videocodecid = 4
framerate = 29.9699859619141
videodatarate = 400
height = 240
width = 360
duration = 227.46
---------------------------------------------------------

All this information is great, but yes the cuepoints are missing, or am I missing something? It seems like the cuepoint sare stored in an array, but why are its elemens undefined?

Is this possible at all? Or do we need the media server for this?

Any other way of getting the information? Is there a cuepoints property that is undocumented?

Any help appreciated.

Thank you very much.

Best Regards

Stephan

Distance Between Cuepoints?
Hello!
I'm approaching deadline and have a little problem to solve.

I want to calculate the distance in time between two cuepoints in flv playback.

For example when the timecursor is between cuepoint 1 and cuepoint 2 I want to show some text, and when it's between cuepoint 2 and 4 I want to show some other text.

Do you see where I'm going?
Thanx in advance for any help at all!!

Cheers!

Anyone Up For A Cuepoints Chalenge?
Hello people,
So here is the task at hand. I have a flvPlayBack component playing a movie. Lets say the movie is 1:18 seconds long. At the end of the movie I need it to make a movie clip, with an instance name "menu", visible again.
Using this script. menu._visible = true; (yeah I know duhh... obviously)

If anyone can help me with this it will be more then greatly appreciated.

Thanks
- Pamela

Anyone Up For A Cuepoints Chalenge?
Hello people,
So here is the task at hand. I have a flvPlayBack component playing a movie. Lets say the movie is 1:18 seconds long. At the end of the movie I need it to make a movie clip, with an instance name "menu", visible again.
Using this script. menu._visible = true; (yeah I know duhh... obviously)

If anyone can help me with this it will be more then greatly appreciated.

Thanks
- Pamela

CuePoints And Listeners HELP
Ok, I have an FLV that progressively downloads, on the root timeline. It's instance name is "vid"
at 1 second into it I want it to perform a function, and at 15 seconds I want it to perform a function. So I am using this:


Code:
_root.vid.setMedia("dive.flv", "FLV");
_root.vid.addCuePoint("divecuestart", 01);
_root.vid.addCuePoint("divecueend", 15);

divelistenstart = new Object();
divelistenstart.cuePoint = function(eventObject){
doThisStuff(eventObject.target.name);
};
_root.vid.addEventListener("cuePoint",divelistenstart);
function doThisStuff(mediaCue){
switch (mediaCue) {
case "divecuestart":
trace("start");
break;
case "divecueend":
trace("end");
};
};
But it doesn't work.
Any ideas why?

CuePoints? Need Advice
Ok, so im currently making a site in flash and I need some advice on how to do something a little trickey. Basically, on one the of the pages, when it loads up it starts a presentation (a seperate movieclip named "RBBM Intro") and there's a pic in the background of some janitorial workers. This picture was converted to a movieclip named "RBBG". So when the presentation is playing, in the beginning everythings good, legible, nice looking. But at the end when the services list is displayed, it runs down into the picture and you cant read anything.

What I want to do is when the presentation reaches that end frame (490) I want to have the picture in the background (RBBG) dissapear so you can read the services listed. Is a cuepoint what I need for this? I may be totally off, but I was looking through the AS index and cuepoint seemed like it might be useful. Is there a way I can set a cuepoint at frame 490 of the presentation, to "cue" this picture to dissapear? Or does anyone know a meathod I can achieve this with??

Any help would be appriciated, thanks!

*EDIT*

Ok, after some further research, I don't think CuePoints is what I want. It seems to be for video navigation, not really what im looking for. Anyone know what I could possibly need??

FLV CuePoints Help Needed
Hi folks -

Here's the situation: I have an FLVplayback component that can play any of seven videos called through an XML playlist just like Lisa Larson-Kelley put together here >

http://www.adobe.com/devnet/flash/ar..._playlist.html

There's an FLA, an external .as file, and an .xml file with the playlist. How do I get a dynamic text field to recognize a cue point inside whatever video's playing and display what i want (ie the current video's title)? do i even need to worry about cue points or can i just have it look at the xml file? help!

[F8 AS2] Naming CuePoints In AS
I've got this FLV which plays, and one cue Point at the end where the timeline advances to frame 2 and a static mc fades in in front of it with clickable text links.

I've been over the documentation and I'm getting most of it but I'm not seeing where I explicitly name the cuePoint so AS will recognize it.

the code I have is:

Code:
stop();
var listenerObject:Object = new Object;
listenerObject.cuePoint = function (eventObject:Object):Void {
this.gotoAndPlay(2);
};
The cue Point is named fadeInFrame. How do I name it for the AS to see it? It doesn't seem to be in the help files.

Change Flv Cuepoints
Does anyone know inside of Flash Video Exporter how to edit a location of cuepoint inside an existing flv file? If this is not possible, what 3rd party program enables this for Flash 8 video? I do not want to have to render out a video every time i need to change cue points.

TIA!

AS2 - FLV Control Via CuePoints
I have an FLV with cue Points (set to Navigation), why on earth can't I check 2 values to determine playback??.

My goal is to track the user at various states (using a myPlayState variable). If they've done certain things they'll continue down the movie, but if they haven't it, the movie will forever loop in a "hold" pattern.

Even though the first condition in my "if" statement is set below, both parts of the function run?

Thanks for the help!


Code:
import mx.video.*;
var myPlayState:String = "intro";

var vidListener:Object = new Object();
vidListener.cuePoint = function(eventObject:Object):Void {
if(eventObject.info.name == "holdEnd" && _root.myPlayState == "intro"){
my_FLVPlybk.seekToNavCuePoint("holdStart")
} else {
trace("I should go do something else");
}
}

my_FLVPlybk.addEventListener("cuePoint", vidListener);
my_FLVPlybk.contentPath = "myVideo.flv";

PLEASE HELP HOTSPOT AND CUEPOINTS.
Hi i was reading your "Modifications to Lee's Netstream Video Player" Post

It is very Helpful. I need to ask you For help with my current project i am relatively A noob but i have learned alot from gotoandlearn.com.

My question is if i can create a hot spot in the video played in the "Netstream Video Player" for example.

Video1 plays and after 20secs a PIP icon appears, already previously edited into the Video1.avi that i converted to Video1.flv, when this "icon" appears i want the user to click on the icon in order to Play a new Video "video2",video2 is a specific "url" to "icon1".

After "Video2" finishes playing I want to have the user choose to play "Video2" again or Continue Playing "Video1" from its previous state i.e.(20secs in to video).

Also I will have about 10 "icons" that appear throughout "Video1",each icon has a unique "Url". And the "Icon/Hotspot" can not cover the "PIP icon" In "Video1" but will just serve the purpose of letting the user click over that area, as if clicking directly on the video. These Icons should expire as the "PIP icon" disappears.

I know that contining to play a video1 from previous state is a value assigned when user click icon but i dont know how to create it.

Please Help I would Appreaciate any Feedback

AHMED

Cuepoints And NetStream
Hi everyone - I currently use the MX media display,cuepoints,and a switch/case statement to synch graphics up with video.

the structure basically looks like this:

Code:

myVideo.setMedia("video/myflv.flv", "FLV");

myVideo.addCuePoint("one", 1);
myVideo.addCuePoint("two", 2);

cuePointListener = new Object();
cuePointListener.cuePoint = function(eventObject) {
   doThisStuff(eventObject.target.name);
   };

myVideo.addEventListener("cuePoint", cuePointListener);

function doThisStuff(mediaCue) {
   switch (mediaCue) {
   case "one" :
                  trace("one");
      break;
   case "two" :
      trace("two");
      break;
   
   }
}


This has totally worked fine but I'd like to be able to use do this with a video object and a netStream. and I can't seem to get it to work.
Can anyone comment on the existing code? and possibly offer suggestions on how to use the netStream object to do the same thing?

thanks!!
Andy

Use Cuepoints Without Components
Is it possible to read out cuepoints in flash without using any of the components from the component list.

I use squeeze to add cuepoints to my movies.

A Concrete Example Of Actionscripted CuePoints?
I have searched the discussion boards for a simple snippet of code that demonstrates cuePoints in action but have been to no avail. Nothing in concrete fashion.

I simply want my movie to advance to another frame once an flv is finished playing.

Any suggestions? This is driving me nuts. I understand the concept, just not the implementation.

Thank you in advance.

Dynamically Adding CuePoints
My question is simple. How do you add dynamic cuePoints to a flash movie. What I mean is this...

myMedia.addCuePoint(cuePointName, cuePointTime)

This is the actionscript syntax for adding a cuepoint. However, I would like to input a variable (probably from an external text file) for "cuePointTime" instead of a hard coded number of seconds.

Can this be done (or is there another solution to achieve the same result)?? Just putting in a variable name for "cuePointTime" does not work. Seems like flash only wants to see a number there.

Can someone help me? Thank you very much!!

Video Cuepoints Question
I have a customized video player build from scratch with NetConnection and NetStream objects and I want to add Actionscript cue points at runtime that are loaded from an xml file. Is that possible?

I found this to be very easy using the video components that ship with Flash (FLVPlayback and Media), all of them have addCuePoint methods, but neither the NetConnection nor the Netstream object seem to have support for adding cue points. Any ideas?

Thanks

Video Event Cuepoints
Hi there all.

I have an FLV video with 2 cue points.... I have traced them with the following code, and now I need each cuepoint to trigger its own movieclip.

cuepoint "1" to play MC "1"
and... cuepoint "2" to play MC "2".....

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
showreel.attachVideo(ns);

ns.onCuePoint = function(infoObject:Object) {
trace("onCuePoint:");
for (var propName in infoObject) {
if (propName != "parameters") {
trace(propName+" = "+infoObject[propName]);
} else {
trace("parameters =");
if (infoObject.parameters != undefined) {
for (var paramName in infoObject.parameters) {
trace(" "+paramName+": "+infoObject.parameters[paramName]);
}
} else {
trace("undefined");
}
}
}
trace("---------");
};

ns.play("myvideo.flv");

Because each cuepoint has the same name as it's MC, can i use some simple code to achieve this without needing complicated arrays???

Any help would be much appreciated!

Cheers

Justin

Video Event Cuepoints
Hi there all.

I have an FLV video with 2 cue points.... I have traced them with the following code, and now I need each cuepoint to trigger its own movieclip.

cuepoint "1" to play MC "1"
and... cuepoint "2" to play MC "2".....

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
showreel.attachVideo(ns);

ns.onCuePoint = function(infoObject:Object) {
trace("onCuePoint:");
for (var propName in infoObject) {
if (propName != "parameters") {
trace(propName+" = "+infoObject[propName]);
} else {
trace("parameters =");
if (infoObject.parameters != undefined) {
for (var paramName in infoObject.parameters) {
trace(" "+paramName+": "+infoObject.parameters[paramName]);
}
} else {
trace("undefined");
}
}
}
trace("---------");
};

ns.play("myvideo.flv");

Because each cuepoint has the same name as it's MC, can i use some simple code to achieve this without needing complicated arrays???

Any help would be much appreciated!

Cheers

Justin

Manually Input Cuepoints
Okay, so flash CS3 kept crashing when I was scrolling through the video to add cue points at the time of encoding. I ended up just importing it without the cue points, then manually added the cuepoints through the parameters, so now they have the "Actionscript" type rather than "Navigation". How the hell do I target/use these puppies? Here is my script:

First I have this:

var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
trace("Cue point name: " + eventObject.info.name);
trace("Cue point type: " + eventObject.info.type);
}
flv_part1.addEventListener("cuePoint",listenerObje ct);

then this:

ch1.onRelease = function() {
flv_part1.seekToNavCuePoint("Start");
}

ch2.onRelease = function() {
flv_part1.seekToNavCuePoint("Next");
}

etc.

I know that the "seekToNavCuePoint" probably won't work, since these are not nav cuepoints. Anyone know the correct syntax for this?

Much thanks!

Inserting Cuepoints In Streaming-flv
Hi All

I'm currently working on a project, where I am streaming a flv from a FMS server. I'm using NetStream and showing the video through a video object.

This works fine, but I need to insert a few cuepoints. Is there any way to do this with actionscript? I would rather avoid embedding the cuepoints in the flv itself when encoding, since it's hard to edit, if the cuepoints are wrong.

Thanks!

Looping An Area Of An FLV Using CuePoints...
Basically it is a vid of a guy on a treadmill walking at various speeds that will be choosen by the user so each speed needs to loop.


I have a flv with a navigation cuepoint set at say 2 second mark. This cuePoint is called "Walk".

THis is triggered by a button called "my_button".


Now lets say I want to encode an Event cue point at the 10 second mark called "WalkLoop".

Then when I press "my_button" I want the flv to begin playing at "Walk" and when it hits "WalkLoop" I want it to go back to "Walk" - it needs to continuously loop until a user hits another button.


My question is how do I construct the AS to tell the flv that when it hits "WalkLoop" return to "Walk".

Thanks in advance.

Possible Mac Flash Player Bug With Cuepoints?
Hey everyone,

I am in the process of building a website that uses a video with embedded cue points to trigger reaction animations. I have it working as intended on my PC versions of the flash player, but there seems to be an issue on mac the mac flash player. It seems to be related to the caching of the file and possibly the buffer time. Does anyone know of any bugs in the flash player for this?

the test url is: http://projects.2harmony.com/hcd_sit...sh_bin/#/home/


Thanks ahead of time,
Jason

Actual Example Of CuePoints In Action
I have searched the discussion boards for a simple snippet of code that demonstrates cuePoints in action but have been to no avail.

I simply want my movie to advance to another frame once an flv is finished playing.

Any suggestions?

Thank you in advance.

Copyright © 2005-08 www.BigResource.com, All rights reserved