-
1. Re: CuePoints AS2 Not working Properly Netstream
selangov Jul 16, 2010 6:41 AM (in response to danielnr87)Hi
Below code works fine in cue points trigger when the video is playing.
I have three cue points in my video namely cuepoint1, cuepoint2 and cuepoint3. The following code triggers the alert message "YO!Loading banner_holder!" when the video reaches the cuepoint1. If you would like you can add conditions for any number of cuepoints.
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.onCuePoint = function(infoObject:Object)
{
trace("onCuePoint:");
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");
}
}
}
trace("---------");
if(infoObject.name == "cuepoint1") {
trace("YO!Loading banner_holder!");
}
}
ns.play("flv_file_name.flv");
Thanks -
2. Re: CuePoints AS2 Not working Properly Netstream
danielnr87 Jul 17, 2010 5:19 AM (in response to selangov)Hi Selangov,
Thanks you for replying and tring to help...unfortunately it still doesnt work. It just doesnt seem to recognise the cuepoints!? I have double checked all the code you gave me, and made sure that my netstream was called ns.
Still no luck. What program are you using to add the cuepoints to the FLV? Im wondering if that has anything to do with it.? The only code I have found that 'sees' the cuepoints is in my first post!
Not sure whats going on....?
Cheers for any help