FORUMS: list search recent posts

Cue Point Question.

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
downtownguy
Cue Point Question.
on Jan 31, 2006 at 4:38:20 am

I was wondering if there was any way of using cue points with the following method of playing an FLV video?

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



Return to posts index

lajoiet
Re: Cue Point Question.
on Jan 31, 2006 at 2:23:54 pm

You should be able to use:

ns.onCuePoint = function(infoObject:Object) {
trace("onCuePoint:");// not needed, but it will tell you the parameters of your cue point
//plus whatever other code you want to happen when a CuePoint is reached
}


If you do a search in the help file for flash for "onCuePoint" you can read the help file for more information.


Return to posts index

downtownguy
Re: Cue Point Question.
on Jan 31, 2006 at 11:03:19 pm

As always, thanks a bunch! :)

I will play around with it.



Return to posts index


lajoiet
Re: Cue Point Question.
on Jan 31, 2006 at 11:27:34 pm

Doh!!!!

trace("onCuePoint");

isn't going to give you the parameters of your cuepoint, it's just going to trace "onCuePoint".

to get the information in the cuePoint object you need to run a batch of code like this (from Flash's Help File):

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


Return to posts index

downtownguy
Re: Cue Point Question.
on Feb 3, 2006 at 6:02:25 am

Thanks again so much for your help! :) Here's what I came up with, thanks to your help, and the help of a few other people on the WWW.

FIrst, I used Flash 8 Professional to embed my event cue points at specific times. Then, I used the following ActionScript:

var myCueNextIndex:Number = 0;

var myCue:Array = new Array();
myCue.push(intro);
myCue.push(clarity);
myCue.push(regain);
myCue.push(bottleTwo);
myCue.push(brainTest);

// EVENT HANDLER: onCuePoint

ns.onCuePoint = function(eventObj:Object)
{
var myCueNext:MovieClip = myCue [ myCueNextIndex ];
myCueNext.play();

myCueNextIndex++;
}



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]