<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How to Use Flash Video (FLV) Cue Points</title>
	<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points</link>
	<description>Luck is the residue of good design.</description>
	<pubDate>Wed, 19 Nov 2008 04:15:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Susan</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-289536</link>
		<pubDate>Mon, 20 Oct 2008 19:10:19 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-289536</guid>
					<description>I am very stuck! I am trying to use cuepoints to pause a video after each chapter (3 chapters). I have a List and FLVPlayer component on stage. Using navigation cue points and the list I can click on a name and go to each chapter, that works. I want to now use cuepoints to pause at the end of each chapter but still play when another chapter is chosen. Code so far is below. I could add event cuepoints or actionscript cue points as needed for the pauses. 

Thank you for reading this,
Susan

CODE:

import fl.controls.List;

cueList.addEventListener(Event.CHANGE,playCue);

function playCue(e:Event):void {
	vid.seekToNavCuePoint(e.target.selectedItem.data);
}</description>
		<content:encoded><![CDATA[<p>I am very stuck! I am trying to use cuepoints to pause a video after each chapter (3 chapters). I have a List and FLVPlayer component on stage. Using navigation cue points and the list I can click on a name and go to each chapter, that works. I want to now use cuepoints to pause at the end of each chapter but still play when another chapter is chosen. Code so far is below. I could add event cuepoints or actionscript cue points as needed for the pauses. </p>
<p>Thank you for reading this,<br />
Susan</p>
<p>CODE:</p>
<p>import fl.controls.List;</p>
<p>cueList.addEventListener(Event.CHANGE,playCue);</p>
<p>function playCue(e:Event):void {<br />
	vid.seekToNavCuePoint(e.target.selectedItem.data);<br />
}
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Gerry McAteer</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-289346</link>
		<pubDate>Mon, 20 Oct 2008 08:28:44 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-289346</guid>
					<description>Sorry David should have mentioned that I am using AS2

thanks

Gerry</description>
		<content:encoded><![CDATA[<p>Sorry David should have mentioned that I am using AS2</p>
<p>thanks</p>
<p>Gerry
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Gerry McAteer</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-289345</link>
		<pubDate>Mon, 20 Oct 2008 08:27:46 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-289345</guid>
					<description>Hi David

I am using the following to listen for when a cuepoint is reached and then updating the scrollbar position on a listbox (i.e. moving the bar down by one each time.) I load the cue point name and time via an XML file.
Everything works fine until I set the cue point time greater than 60 seconds is there a time 'format' I need to use?

var listenerObject:Object = new Object(); 
listenerObject.cuePoint = function(eventObject:Object):Void {
trace(&quot;cue point reached at: &quot; + eventObject.info.name);
}

thanks

Gerry</description>
		<content:encoded><![CDATA[<p>Hi David</p>
<p>I am using the following to listen for when a cuepoint is reached and then updating the scrollbar position on a listbox (i.e. moving the bar down by one each time.) I load the cue point name and time via an XML file.<br />
Everything works fine until I set the cue point time greater than 60 seconds is there a time &#8216;format&#8217; I need to use?</p>
<p>var listenerObject:Object = new Object();<br />
listenerObject.cuePoint = function(eventObject:Object):Void {<br />
trace(&#8221;cue point reached at: &#8221; + eventObject.info.name);<br />
}</p>
<p>thanks</p>
<p>Gerry
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Someone</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-278691</link>
		<pubDate>Thu, 25 Sep 2008 05:20:16 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-278691</guid>
					<description>Keiths issue isn't with FMS but his CDN. You can use FLVPlayback for FMS, but CDN's will not function by a rtmp string in FLVPlayback as is because they run off dynamic ips. You have to run a video off their custom classes often supplied, but you may have to dig or ask for them.

Which brings me to my issue we perfer to use a CDN for the global reach, but we have a big problem with NetStream not taking cue points at runtime in AS3. Defiently is for the worse, and I will let them know it at Max. Nevertheless I need a solution. I'm going to try to get FLVPlayback to work with my CDN's class... can you post some code showing FLVPlayback being subsituted for NetStream. My hope is it will act as the video container and the rest will fly. I'll post it, let me know if you think it can be converted to use FLVPB

// AkamaiConnection class AS3 Reference Player
//
// This class demonstrates use of the AkamaiConnection class
// in connecting to the Akamai CDN and in rendering and controlling
// a streaming video. 

package {

	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.media.Video;
	import fl.controls.Button;
	import fl.controls.Slider;
	import fl.events.SliderEvent;
	import com.akamai.AkamaiConnection;
	import com.akamai.events.*;

	public class CS3sampleAMDOnDemand extends MovieClip {

		// UI elements
		private var video:Video;
		private var bPlayPause:Button;
		private var videoSlider:Slider;
		private var volumeSlider:Slider;
		private var timeDisplay:TextField;
		private var bufferingDisplay:TextField;

		// Variables
		private var ak:AkamaiConnection;
		private var dragging:Boolean;
		
		// Constants - replace these with references to your own content
		private const HOSTNAME:String = &quot;cp27886.edgefcs.net&quot;;
		private const FILENAME:String = &quot;14808/nocc_small307K&quot;;
		
		// Constructor
		public function CS3sampleAMDOnDemand():void {
			addChildren();
			initVars();
		}
		// Add the children to the stage
		private function addChildren():void {
			// Draw background
			this.graphics.beginFill(0x444444);
			this.graphics.drawRoundRect(10,10,338,250,10);
			this.graphics.endFill();
			// Add video
			video = new Video(318,180);
			video.x = 20;
			video.y = 20;
			addChild(video);
			// Add playPause button
			bPlayPause = new Button();
			bPlayPause.width = 60;
			bPlayPause.label = &quot;Pause&quot;;
			bPlayPause.enabled = false;
			bPlayPause.x = 20;
			bPlayPause.y = 230;
			bPlayPause.addEventListener(MouseEvent.CLICK,doPlayPause);
			addChild(bPlayPause);
			// Add the video slider
			videoSlider = new Slider();
			videoSlider.width = 220;
			videoSlider.x = 20;
			videoSlider.y = 210;
			videoSlider.minimum = 0;
			videoSlider.enabled = false;
			videoSlider.addEventListener(SliderEvent.THUMB_PRESS,beginDrag);
			videoSlider.addEventListener(SliderEvent.THUMB_RELEASE,endDrag);
			addChild(videoSlider);
			// Add the volume slider
			volumeSlider = new Slider();
			volumeSlider.width = 80;
			volumeSlider.x = 250;
			volumeSlider.y = 210;
			volumeSlider.minimum = 0;
			volumeSlider.maximum = 100;
			volumeSlider.value = 80;
			volumeSlider.enabled = false;
			volumeSlider.addEventListener(SliderEvent.CHANGE,volumeHandler);
			addChild(volumeSlider);
			// Add the time display
			var format:TextFormat = new TextFormat();
			format.color = 0xFFFFFF;
			format.font = &quot;Verdana&quot;;
			format.bold = true;
			timeDisplay = new TextField();
			timeDisplay.x = 240;
			timeDisplay.y = 230;
			timeDisplay.width = 200;
			timeDisplay.defaultTextFormat = format;
			addChild(timeDisplay);
			// Add the buffering display
			bufferingDisplay = new TextField();
			bufferingDisplay.x = 100;
			bufferingDisplay.y = 230;
			bufferingDisplay.width = 200;
			bufferingDisplay.defaultTextFormat = format;
			bufferingDisplay.text = &quot;Loading ...&quot;;
			addChild(bufferingDisplay);
		}
		// Handle the start of a video scrub
		private function beginDrag(e:SliderEvent):void {
			dragging = true;
		}
		// handle the end of a video scrub
		private function endDrag(e:SliderEvent):void {
			ak.seek(videoSlider.value);
		}
		// Update the volume
		private function volumeHandler(e:SliderEvent):void {
			ak.volume = volumeSlider.value/100;
		}
		// Handles the playPause button press
		private function doPlayPause(e:MouseEvent):void {
			switch (bPlayPause.label) {
				case &quot;Pause&quot; :
				ak.pause();
				bPlayPause.label = &quot;Play&quot;;
					break;
				case &quot;Play&quot; :
				ak.resume();
				bPlayPause.label = &quot;Pause&quot;;
					break;
			}
		}
		// Initializes variables with starting values
		private function initVars():void {
			dragging = false;
			ak = new AkamaiConnection();
			ak.createStream = true;
			ak.addEventListener(AkamaiNotificationEvent.CONNECTED,connectedHandler);
			ak.addEventListener(AkamaiNotificationEvent.PROGRESS,progressHandler);
			ak.addEventListener(AkamaiNotificationEvent.BANDWIDTH,bandwidthHandler);
			ak.addEventListener(AkamaiNotificationEvent.STREAM_LENGTH,streamlengthHandler);
			ak.addEventListener(AkamaiNotificationEvent.COMPLETE,completeHandler);
			ak.addEventListener(AkamaiStatusEvent.NETCONNECTION,netStatusHandler);
			ak.addEventListener(AkamaiStatusEvent.NETSTREAM,netStreamStatusHandler);
			ak.addEventListener(AkamaiStatusEvent.NETSTREAM_METADATA,metadataHandler);
			ak.addEventListener(AkamaiStatusEvent.NETSTREAM_CUEPOINT,cuepointHandler);
			ak.addEventListener(AkamaiErrorEvent.ERROR,onError);
			ak.connect(HOSTNAME);
		}
		// Handles a successful connection
		private function connectedHandler(e:AkamaiNotificationEvent):void {
			trace(&quot;Successfully connected using &quot; + ak.actualProtocol + &quot; on port &quot; + ak.actualPort);
			// As soon as we are connected, we'll measure the available bandwidth
			ak.detectBandwidth();
			
		}
		// Handles a successful bandwidth measurement
		private function bandwidthHandler(e:AkamaiNotificationEvent):void {
			trace(&quot;The bandwidth is &quot; + ak.bandwidth + &quot;kbps and the latency is &quot; + ak.latency + &quot; ms.&quot;);
			// At this point, you could use the bandwidth value to decide which file to play.
			ak.requestStreamLength(FILENAME);
		}
		// Handles a successful stream length request
		private function streamlengthHandler(e:AkamaiNotificationEvent):void {
			videoSlider.maximum = ak.streamLength;
			video.attachNetStream(ak.netStream);
			ak.play(FILENAME);
			bPlayPause.enabled = true;
			videoSlider.enabled = true;
			volumeSlider.enabled = true;
			ak.volume = .8;
		}
		// Updates the UI elements as the  video plays
		private function progressHandler(e:AkamaiNotificationEvent):void {
			timeDisplay.text = ak.timeAsTimeCode + &quot; &amp;#124; &quot; + ak.streamLengthAsTimeCode;
			if (!dragging) {
			videoSlider.value = ak.time;
			}
			bufferingDisplay.visible = ak.isBuffering;
			bufferingDisplay.text = &quot;Buffering: &quot; + ak.bufferPercentage+&quot;%&quot;;
		}
		
		// Handles netstream status events. We trap the buffer full event
		// in order to start updating our slider again, to prevent the
		// slider bouncing after a drag.
		private function netStreamStatusHandler(e:AkamaiStatusEvent):void {
			switch (e.info.code) {
				case &quot;NetStream.Buffer.Full&quot;:
					dragging = false;
				break;
			}
		}
		
		// Handles NetConnection status events. The description notifier is displayed
		// for rejection events.
		private function netStatusHandler(e:AkamaiStatusEvent):void {
			trace(e.info.code);
			if (e.info.code == &quot;NetConnection.Connect.Rejected&quot;) {
				trace(&quot;Rejected by server. Reason is &quot;+e.info.description);
			}
		}
		// Catches the end of the stream. Note that the AkamaiNotificationEvent.COMPLETE
		// event should only be used to detect the end of streaming files. For progressive delivery,
		// use the AkamaiNotificationEvent.END_OF_STREAM event. 
		private function completeHandler(e:AkamaiNotificationEvent):void {
			ak.pause();
			ak.seek(0);
			bPlayPause.label = &quot;Play&quot;;
		}
		// Handles metadata that is released by the stream
		private function metadataHandler(e:AkamaiStatusEvent):void {
			trace(&quot;Metadata received:&quot;);
				for (var propName:String in e.info) {
					trace(&quot;metadata: &quot;+propName+&quot; = &quot;+e.info[propName]);
				}
		}
		// Receives all cuepoint events dispatched by the NetStream
		private function cuepointHandler(e:AkamaiStatusEvent):void {
			trace(&quot;Cuepoint received:&quot;);
				for (var propName:String in e.info) {
						if (propName != &quot;parameters&quot;) {
							trace(propName+&quot; = &quot;+e.info[propName]);
						} else {
							trace(&quot;parameters =&quot;);
							if (e.info.parameters != undefined) {
								for (var paramName:String in e.info.parameters) {
									trace(&quot; &quot;+paramName+&quot;: &quot;+e.info.parameters[paramName]);
								}
							} else {
								trace(&quot;undefined&quot;);
							}
						}
				}
		}
		
		// Handles any errors dispatched by the connection class.
		private function onError(e:AkamaiErrorEvent):void {
			trace(&quot;Error: &quot; + e.errorDescription);
		}
	}
}</description>
		<content:encoded><![CDATA[<p>Keiths issue isn&#8217;t with FMS but his CDN. You can use FLVPlayback for FMS, but CDN&#8217;s will not function by a rtmp string in FLVPlayback as is because they run off dynamic ips. You have to run a video off their custom classes often supplied, but you may have to dig or ask for them.</p>
<p>Which brings me to my issue we perfer to use a CDN for the global reach, but we have a big problem with NetStream not taking cue points at runtime in AS3. Defiently is for the worse, and I will let them know it at Max. Nevertheless I need a solution. I&#8217;m going to try to get FLVPlayback to work with my CDN&#8217;s class&#8230; can you post some code showing FLVPlayback being subsituted for NetStream. My hope is it will act as the video container and the rest will fly. I&#8217;ll post it, let me know if you think it can be converted to use FLVPB</p>
<p>// AkamaiConnection class AS3 Reference Player<br />
//<br />
// This class demonstrates use of the AkamaiConnection class<br />
// in connecting to the Akamai CDN and in rendering and controlling<br />
// a streaming video. </p>
<p>package {</p>
<p>	import flash.display.MovieClip;<br />
	import flash.events.MouseEvent;<br />
	import flash.text.TextField;<br />
	import flash.text.TextFormat;<br />
	import flash.media.Video;<br />
	import fl.controls.Button;<br />
	import fl.controls.Slider;<br />
	import fl.events.SliderEvent;<br />
	import com.akamai.AkamaiConnection;<br />
	import com.akamai.events.*;</p>
<p>	public class CS3sampleAMDOnDemand extends MovieClip {</p>
<p>		// UI elements<br />
		private var video:Video;<br />
		private var bPlayPause:Button;<br />
		private var videoSlider:Slider;<br />
		private var volumeSlider:Slider;<br />
		private var timeDisplay:TextField;<br />
		private var bufferingDisplay:TextField;</p>
<p>		// Variables<br />
		private var ak:AkamaiConnection;<br />
		private var dragging:Boolean;</p>
<p>		// Constants - replace these with references to your own content<br />
		private const HOSTNAME:String = &#8220;cp27886.edgefcs.net&#8221;;<br />
		private const FILENAME:String = &#8220;14808/nocc_small307K&#8221;;</p>
<p>		// Constructor<br />
		public function CS3sampleAMDOnDemand():void {<br />
			addChildren();<br />
			initVars();<br />
		}<br />
		// Add the children to the stage<br />
		private function addChildren():void {<br />
			// Draw background<br />
			this.graphics.beginFill(0&#215;444444);<br />
			this.graphics.drawRoundRect(10,10,338,250,10);<br />
			this.graphics.endFill();<br />
			// Add video<br />
			video = new Video(318,180);<br />
			video.x = 20;<br />
			video.y = 20;<br />
			addChild(video);<br />
			// Add playPause button<br />
			bPlayPause = new Button();<br />
			bPlayPause.width = 60;<br />
			bPlayPause.label = &#8220;Pause&#8221;;<br />
			bPlayPause.enabled = false;<br />
			bPlayPause.x = 20;<br />
			bPlayPause.y = 230;<br />
			bPlayPause.addEventListener(MouseEvent.CLICK,doPlayPause);<br />
			addChild(bPlayPause);<br />
			// Add the video slider<br />
			videoSlider = new Slider();<br />
			videoSlider.width = 220;<br />
			videoSlider.x = 20;<br />
			videoSlider.y = 210;<br />
			videoSlider.minimum = 0;<br />
			videoSlider.enabled = false;<br />
			videoSlider.addEventListener(SliderEvent.THUMB_PRESS,beginDrag);<br />
			videoSlider.addEventListener(SliderEvent.THUMB_RELEASE,endDrag);<br />
			addChild(videoSlider);<br />
			// Add the volume slider<br />
			volumeSlider = new Slider();<br />
			volumeSlider.width = 80;<br />
			volumeSlider.x = 250;<br />
			volumeSlider.y = 210;<br />
			volumeSlider.minimum = 0;<br />
			volumeSlider.maximum = 100;<br />
			volumeSlider.value = 80;<br />
			volumeSlider.enabled = false;<br />
			volumeSlider.addEventListener(SliderEvent.CHANGE,volumeHandler);<br />
			addChild(volumeSlider);<br />
			// Add the time display<br />
			var format:TextFormat = new TextFormat();<br />
			format.color = 0xFFFFFF;<br />
			format.font = &#8220;Verdana&#8221;;<br />
			format.bold = true;<br />
			timeDisplay = new TextField();<br />
			timeDisplay.x = 240;<br />
			timeDisplay.y = 230;<br />
			timeDisplay.width = 200;<br />
			timeDisplay.defaultTextFormat = format;<br />
			addChild(timeDisplay);<br />
			// Add the buffering display<br />
			bufferingDisplay = new TextField();<br />
			bufferingDisplay.x = 100;<br />
			bufferingDisplay.y = 230;<br />
			bufferingDisplay.width = 200;<br />
			bufferingDisplay.defaultTextFormat = format;<br />
			bufferingDisplay.text = &#8220;Loading &#8230;&#8221;;<br />
			addChild(bufferingDisplay);<br />
		}<br />
		// Handle the start of a video scrub<br />
		private function beginDrag(e:SliderEvent):void {<br />
			dragging = true;<br />
		}<br />
		// handle the end of a video scrub<br />
		private function endDrag(e:SliderEvent):void {<br />
			ak.seek(videoSlider.value);<br />
		}<br />
		// Update the volume<br />
		private function volumeHandler(e:SliderEvent):void {<br />
			ak.volume = volumeSlider.value/100;<br />
		}<br />
		// Handles the playPause button press<br />
		private function doPlayPause(e:MouseEvent):void {<br />
			switch (bPlayPause.label) {<br />
				case &#8220;Pause&#8221; :<br />
				ak.pause();<br />
				bPlayPause.label = &#8220;Play&#8221;;<br />
					break;<br />
				case &#8220;Play&#8221; :<br />
				ak.resume();<br />
				bPlayPause.label = &#8220;Pause&#8221;;<br />
					break;<br />
			}<br />
		}<br />
		// Initializes variables with starting values<br />
		private function initVars():void {<br />
			dragging = false;<br />
			ak = new AkamaiConnection();<br />
			ak.createStream = true;<br />
			ak.addEventListener(AkamaiNotificationEvent.CONNECTED,connectedHandler);<br />
			ak.addEventListener(AkamaiNotificationEvent.PROGRESS,progressHandler);<br />
			ak.addEventListener(AkamaiNotificationEvent.BANDWIDTH,bandwidthHandler);<br />
			ak.addEventListener(AkamaiNotificationEvent.STREAM_LENGTH,streamlengthHandler);<br />
			ak.addEventListener(AkamaiNotificationEvent.COMPLETE,completeHandler);<br />
			ak.addEventListener(AkamaiStatusEvent.NETCONNECTION,netStatusHandler);<br />
			ak.addEventListener(AkamaiStatusEvent.NETSTREAM,netStreamStatusHandler);<br />
			ak.addEventListener(AkamaiStatusEvent.NETSTREAM_METADATA,metadataHandler);<br />
			ak.addEventListener(AkamaiStatusEvent.NETSTREAM_CUEPOINT,cuepointHandler);<br />
			ak.addEventListener(AkamaiErrorEvent.ERROR,onError);<br />
			ak.connect(HOSTNAME);<br />
		}<br />
		// Handles a successful connection<br />
		private function connectedHandler(e:AkamaiNotificationEvent):void {<br />
			trace(&#8221;Successfully connected using &#8221; + ak.actualProtocol + &#8221; on port &#8221; + ak.actualPort);<br />
			// As soon as we are connected, we&#8217;ll measure the available bandwidth<br />
			ak.detectBandwidth();</p>
<p>		}<br />
		// Handles a successful bandwidth measurement<br />
		private function bandwidthHandler(e:AkamaiNotificationEvent):void {<br />
			trace(&#8221;The bandwidth is &#8221; + ak.bandwidth + &#8220;kbps and the latency is &#8221; + ak.latency + &#8221; ms.&#8221;);<br />
			// At this point, you could use the bandwidth value to decide which file to play.<br />
			ak.requestStreamLength(FILENAME);<br />
		}<br />
		// Handles a successful stream length request<br />
		private function streamlengthHandler(e:AkamaiNotificationEvent):void {<br />
			videoSlider.maximum = ak.streamLength;<br />
			video.attachNetStream(ak.netStream);<br />
			ak.play(FILENAME);<br />
			bPlayPause.enabled = true;<br />
			videoSlider.enabled = true;<br />
			volumeSlider.enabled = true;<br />
			ak.volume = .8;<br />
		}<br />
		// Updates the UI elements as the  video plays<br />
		private function progressHandler(e:AkamaiNotificationEvent):void {<br />
			timeDisplay.text = ak.timeAsTimeCode + &#8221; | &#8221; + ak.streamLengthAsTimeCode;<br />
			if (!dragging) {<br />
			videoSlider.value = ak.time;<br />
			}<br />
			bufferingDisplay.visible = ak.isBuffering;<br />
			bufferingDisplay.text = &#8220;Buffering: &#8221; + ak.bufferPercentage+&#8221;%&#8221;;<br />
		}</p>
<p>		// Handles netstream status events. We trap the buffer full event<br />
		// in order to start updating our slider again, to prevent the<br />
		// slider bouncing after a drag.<br />
		private function netStreamStatusHandler(e:AkamaiStatusEvent):void {<br />
			switch (e.info.code) {<br />
				case &#8220;NetStream.Buffer.Full&#8221;:<br />
					dragging = false;<br />
				break;<br />
			}<br />
		}</p>
<p>		// Handles NetConnection status events. The description notifier is displayed<br />
		// for rejection events.<br />
		private function netStatusHandler(e:AkamaiStatusEvent):void {<br />
			trace(e.info.code);<br />
			if (e.info.code == &#8220;NetConnection.Connect.Rejected&#8221;) {<br />
				trace(&#8221;Rejected by server. Reason is &#8220;+e.info.description);<br />
			}<br />
		}<br />
		// Catches the end of the stream. Note that the AkamaiNotificationEvent.COMPLETE<br />
		// event should only be used to detect the end of streaming files. For progressive delivery,<br />
		// use the AkamaiNotificationEvent.END_OF_STREAM event.<br />
		private function completeHandler(e:AkamaiNotificationEvent):void {<br />
			ak.pause();<br />
			ak.seek(0);<br />
			bPlayPause.label = &#8220;Play&#8221;;<br />
		}<br />
		// Handles metadata that is released by the stream<br />
		private function metadataHandler(e:AkamaiStatusEvent):void {<br />
			trace(&#8221;Metadata received:&#8221;);<br />
				for (var propName:String in e.info) {<br />
					trace(&#8221;metadata: &#8220;+propName+&#8221; = &#8220;+e.info[propName]);<br />
				}<br />
		}<br />
		// Receives all cuepoint events dispatched by the NetStream<br />
		private function cuepointHandler(e:AkamaiStatusEvent):void {<br />
			trace(&#8221;Cuepoint received:&#8221;);<br />
				for (var propName:String in e.info) {<br />
						if (propName != &#8220;parameters&#8221;) {<br />
							trace(propName+&#8221; = &#8220;+e.info[propName]);<br />
						} else {<br />
							trace(&#8221;parameters =&#8221;);<br />
							if (e.info.parameters != undefined) {<br />
								for (var paramName:String in e.info.parameters) {<br />
									trace(&#8221; &#8220;+paramName+&#8221;: &#8220;+e.info.parameters[paramName]);<br />
								}<br />
							} else {<br />
								trace(&#8221;undefined&#8221;);<br />
							}<br />
						}<br />
				}<br />
		}</p>
<p>		// Handles any errors dispatched by the connection class.<br />
		private function onError(e:AkamaiErrorEvent):void {<br />
			trace(&#8221;Error: &#8221; + e.errorDescription);<br />
		}<br />
	}<br />
}
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Mike</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-276266</link>
		<pubDate>Fri, 19 Sep 2008 19:27:29 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-276266</guid>
					<description>Think I have it. Sorry about the multiple posts (the first was a mistake while editing code). Great blog by the way!</description>
		<content:encoded><![CDATA[<p>Think I have it. Sorry about the multiple posts (the first was a mistake while editing code). Great blog by the way!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Mike</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-276070</link>
		<pubDate>Fri, 19 Sep 2008 14:48:18 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-276070</guid>
					<description>One thing I noticed is that the answer above to Eric should be what works for me, aside for two things:
as3 hates Void so I changed my code to void and where you have the &quot;cuePoint&quot; in quotes, I get an error message. If that quote was in reference to an object for a cuePoint, I am missing how that works. 

I think the code you wrote above should work perfectly for me but I'm doing something wrong with my event listener:

var listener:Object = new Object();
listener.cuePoint = function(evt:Object):Void {
  if (evt.name == &quot;theEnd&quot;) {
    gotoAndPlay(&quot;destination&quot;);
  }
}
videoPlayer.addEventListener(&quot;cuePoint&quot;, listener);

I have almost the same code as above now and I understand most of it (so  I Think), but that &quot;cuePoint&quot; throws me. 
I don't have a gotoAndPlay of course, as I want to remove a second swf file I loaded at start. I play to load and remove swf files through out my application, as I want graphic effects to pop in and out throughout a movie.

Thanks!

- Mike</description>
		<content:encoded><![CDATA[<p>One thing I noticed is that the answer above to Eric should be what works for me, aside for two things:<br />
as3 hates Void so I changed my code to void and where you have the &#8220;cuePoint&#8221; in quotes, I get an error message. If that quote was in reference to an object for a cuePoint, I am missing how that works. </p>
<p>I think the code you wrote above should work perfectly for me but I&#8217;m doing something wrong with my event listener:</p>
<p>var listener:Object = new Object();<br />
listener.cuePoint = function(evt:Object):Void {<br />
  if (evt.name == &#8220;theEnd&#8221;) {<br />
    gotoAndPlay(&#8221;destination&#8221;);<br />
  }<br />
}<br />
videoPlayer.addEventListener(&#8221;cuePoint&#8221;, listener);</p>
<p>I have almost the same code as above now and I understand most of it (so  I Think), but that &#8220;cuePoint&#8221; throws me.<br />
I don&#8217;t have a gotoAndPlay of course, as I want to remove a second swf file I loaded at start. I play to load and remove swf files through out my application, as I want graphic effects to pop in and out throughout a movie.</p>
<p>Thanks!</p>
<p>- Mike
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Mike</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-276042</link>
		<pubDate>Fri, 19 Sep 2008 14:11:51 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-276042</guid>
					<description>Hi, I am new to AS3 and trying to get a grasp on how to listen for cue points that I've already compiled into the flv and I want to trigger an event when a specific cue point is reached. 

looking at some of the examples I have seen, I have come up with code that is a not going to work. I'm not sure if I'm starting this right even. 

Any advice would be appreciated :)

var listener:Object = new Object();

//listener.onMetaData = function(listener:Object)

myplayback.addEventListener(MetadataEvent.CUE_POINT, firstBounce);


function firstBounce (listener:MetadataEvent):void{
	trace(listener.info);
    //trace (e.duration);

   if(listener.name == &quot;bounceout2&quot;)
	{
	 stage.removeChild(imageLoader);
	}
}</description>
		<content:encoded><![CDATA[<p>Hi, I am new to AS3 and trying to get a grasp on how to listen for cue points that I&#8217;ve already compiled into the flv and I want to trigger an event when a specific cue point is reached. </p>
<p>looking at some of the examples I have seen, I have come up with code that is a not going to work. I&#8217;m not sure if I&#8217;m starting this right even. </p>
<p>Any advice would be appreciated <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>var listener:Object = new Object();</p>
<p>//listener.onMetaData = function(listener:Object)</p>
<p>myplayback.addEventListener(MetadataEvent.CUE_POINT, firstBounce);</p>
<p>function firstBounce (listener:MetadataEvent):void{<br />
	trace(listener.info);<br />
    //trace (e.duration);</p>
<p>   if(listener.name == &#8220;bounceout2&#8243;)<br />
	{<br />
	 stage.removeChild(imageLoader);<br />
	}<br />
}
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Mal</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-257889</link>
		<pubDate>Thu, 28 Aug 2008 08:43:14 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-257889</guid>
					<description>Thanks David. The cuepoints are added through actionscript rather than baked in cuepoints. All of the flvs are over 100 seconds long.</description>
		<content:encoded><![CDATA[<p>Thanks David. The cuepoints are added through actionscript rather than baked in cuepoints. All of the flvs are over 100 seconds long.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-257817</link>
		<pubDate>Thu, 28 Aug 2008 04:01:23 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-257817</guid>
					<description>&lt;strong&gt;To Bert ...&lt;/strong&gt;

&lt;blockquote&gt;sorry to bother again but i ran up to the next problem.&lt;/blockquote&gt;

No worries!  And sorry about the late reply.  I'm finally done with my book-length writing for the year [&lt;em&gt;crosses fingers&lt;/em&gt;], and I'm slowly making my way back to the forums, email replies, and blog comments.

&lt;blockquote&gt;is it possible to unload the video at the click of a button?&lt;/blockquote&gt;

There's always the &lt;code&gt;NetStream.close()&lt;/code&gt; method.  You could also try &lt;a href=&quot;http://www.quip.net/blog/2007/flash/how-to-adjust-video-audio&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;setting the video's volume to zero&lt;/a&gt; before sending the playhead elsewhere.

&lt;blockquote&gt;Is it even possible to have it faded (sound and image) out before it jumps to the requested framenumber, although this would be just a fancy add on.&lt;/blockquote&gt;

Yes, fading audio is relatively easy.  I wrote a pair of &lt;a href=&quot;http://www.communitymx.com/abstract.cfm?cid=2845A&quot; class=&quot;external&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;cross-fading tutorials&lt;/a&gt; for &lt;a href=&quot;http://www.communitymx.com/&quot; class=&quot;external&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;CommunityMX.com&lt;/a&gt; a few months ago.  One is for AS2 and the other for AS3.  Those particular tutorials require a subscription, but you can start a trial membership and quit after a week (I think) without any obligation (I'm sure).  The basic idea, though, is to use a loop -- say, &lt;code&gt;onEnterFrame&lt;/code&gt; or &lt;code&gt;setInterval()&lt;/code&gt; -- to repeatedly change the volume of a &lt;code&gt;Sound&lt;/code&gt; instance associated with the video, until the volume is down to 0 (or up to 100, as you please).

&lt;blockquote&gt;additional, the project is migrated to AS3.&lt;/blockquote&gt;

It's all still doable, but of course that potentially changes the syntax tremendously.

The basic principles are the same, though, in any case.  Your best bet is to break down each step into small parts and migrate your code in small, easily testable pieces.  Chin up!

&lt;strong&gt;To Mal ...&lt;/strong&gt;

&lt;blockquote&gt;I’ve found that if all of my cuepoints are under 100 (seconds) then they’ll trigger when they should. But if any one of them are over 100, then all of them will trigger at the same time, that of the highest number. What do you think?&lt;/blockquote&gt;

Wow.  That's really interesting -- and I plumb don't have an answer!  Given the delay in my reply, I'm not sure if I can still be of help here, but if you can provide some additional information, I'll try to help you pinpoint it.

Questions that pop to mind:  Do your videos actually run longer than 100 seconds?  Are these &quot;baked in&quot; cue points, or are you adding them with ActionScript?

&lt;strong&gt;To Jeremy ...&lt;/strong&gt;

&lt;blockquote&gt;I have ‘baked’ in a cue point at the end of the video named ‘theEnd’ where I need it to redirect to a different scene.&lt;/blockquote&gt;

There are alternative ways to &lt;a href=&quot;http://www.quip.net/blog/2007/flash/actionscript-20/how-to-determine-completion-of-flv&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;detect the end of a video file&lt;/a&gt;, but using a cue point is fine.  You'll want to use your &lt;code&gt;cuePoint&lt;/code&gt; event handler to invoke the &lt;code&gt;MovieClip.gotoAndPlay()&lt;/code&gt; method.  The thing is, scenes and AS1/2 don't especially play well together.  Rather than sending the playhead to a new scene, give the first frame in that other scene a frame label, then use the frame label as the parameter for the &lt;code&gt;gotoAndPlay()&lt;/code&gt; method.

Does that make sense?

Check out my reply to Eric -- the next reply, actually -- to see suggested sample code.

&lt;strong&gt;To Eric ...&lt;/strong&gt;

Your question is pretty much like Jeremy's, so I'll provide a quick code sample for both of you.  Note, as I mentioned to Jeremy, this assumes you have a frame label in frame 1 of the destination scene.  In this example, the frame label is &quot;destination&quot; and the last cue point in the video is named &quot;theEnd&quot;:

&lt;em&gt;FLVPlayback, assuming the instance name &lt;code&gt;videoPlayer&lt;/code&gt;&lt;/em&gt;

&lt;pre&gt;&lt;code&gt;var listener:Object = new Object();
listener.cuePoint = function(evt:Object):Void {
  if (evt.name == &amp;#34;theEnd&amp;#34;) {
    gotoAndPlay(&amp;#34;destination&amp;#34;);
  }
}
videoPlayer.addEventListener(&quot;cuePoint&quot;, listener);&lt;/code&gt;&lt;/pre&gt;

&lt;em&gt;Non-component, assuming a &lt;code&gt;NetStream&lt;/code&gt; instance named &lt;code&gt;ns&lt;/code&gt;&lt;/em&gt;

&lt;pre&gt;&lt;code&gt;ns.onCuePoint = function(evt:Object):Void {
  if (evt.name == &amp;#34;theEnd&amp;#34;) {
    gotoAndPlay(&amp;#34;destination&amp;#34;);
  }
}&lt;/code&gt;&lt;/pre&gt;

As an alternative, you can forego cue points and use the &lt;code&gt;NetStream.onStatus&lt;/code&gt; event (assuming no FLVPlayback):

&lt;pre&gt;&lt;code&gt;ns.onStatus = function(info) {
  if (info.code == &amp;#34;NetStream.Play.Stop&amp;#34;) {
    gotoAndPlay(&amp;#34;destination&amp;#34;);
  }
};&lt;/code&gt;&lt;/pre&gt;

&lt;strong&gt;To Mike ...&lt;/strong&gt;

By chance, I happened to help someone on the Adobe forums today with &lt;a href=&quot;http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&amp;#38;catid=194&amp;#38;threadid=1388386&amp;#38;enterthread=y&quot; class=&quot;external&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;this exact issue&lt;/a&gt;.  Check out the thread, and write back if you have additional questions, but I think that should get you started.  :)</description>
		<content:encoded><![CDATA[<p><strong>To Bert &#8230;</strong></p>
<blockquote><p>sorry to bother again but i ran up to the next problem.</p></blockquote>
<p>No worries!  And sorry about the late reply.  I&#8217;m finally done with my book-length writing for the year [<em>crosses fingers</em>], and I&#8217;m slowly making my way back to the forums, email replies, and blog comments.</p>
<blockquote><p>is it possible to unload the video at the click of a button?</p></blockquote>
<p>There&#8217;s always the <code>NetStream.close()</code> method.  You could also try <a href="http://www.quip.net/blog/2007/flash/how-to-adjust-video-audio" target="_blank" rel="nofollow">setting the video&#8217;s volume to zero</a> before sending the playhead elsewhere.</p>
<blockquote><p>Is it even possible to have it faded (sound and image) out before it jumps to the requested framenumber, although this would be just a fancy add on.</p></blockquote>
<p>Yes, fading audio is relatively easy.  I wrote a pair of <a href="http://www.communitymx.com/abstract.cfm?cid=2845A" class="external" target="_blank" rel="nofollow">cross-fading tutorials</a> for <a href="http://www.communitymx.com/" class="external" target="_blank" rel="nofollow">CommunityMX.com</a> a few months ago.  One is for AS2 and the other for AS3.  Those particular tutorials require a subscription, but you can start a trial membership and quit after a week (I think) without any obligation (I&#8217;m sure).  The basic idea, though, is to use a loop &#8212; say, <code>onEnterFrame</code> or <code>setInterval()</code> &#8212; to repeatedly change the volume of a <code>Sound</code> instance associated with the video, until the volume is down to 0 (or up to 100, as you please).</p>
<blockquote><p>additional, the project is migrated to AS3.</p></blockquote>
<p>It&#8217;s all still doable, but of course that potentially changes the syntax tremendously.</p>
<p>The basic principles are the same, though, in any case.  Your best bet is to break down each step into small parts and migrate your code in small, easily testable pieces.  Chin up!</p>
<p><strong>To Mal &#8230;</strong></p>
<blockquote><p>I’ve found that if all of my cuepoints are under 100 (seconds) then they’ll trigger when they should. But if any one of them are over 100, then all of them will trigger at the same time, that of the highest number. What do you think?</p></blockquote>
<p>Wow.  That&#8217;s really interesting &#8212; and I plumb don&#8217;t have an answer!  Given the delay in my reply, I&#8217;m not sure if I can still be of help here, but if you can provide some additional information, I&#8217;ll try to help you pinpoint it.</p>
<p>Questions that pop to mind:  Do your videos actually run longer than 100 seconds?  Are these &#8220;baked in&#8221; cue points, or are you adding them with ActionScript?</p>
<p><strong>To Jeremy &#8230;</strong></p>
<blockquote><p>I have ‘baked’ in a cue point at the end of the video named ‘theEnd’ where I need it to redirect to a different scene.</p></blockquote>
<p>There are alternative ways to <a href="http://www.quip.net/blog/2007/flash/actionscript-20/how-to-determine-completion-of-flv" target="_blank" rel="nofollow">detect the end of a video file</a>, but using a cue point is fine.  You&#8217;ll want to use your <code>cuePoint</code> event handler to invoke the <code>MovieClip.gotoAndPlay()</code> method.  The thing is, scenes and AS1/2 don&#8217;t especially play well together.  Rather than sending the playhead to a new scene, give the first frame in that other scene a frame label, then use the frame label as the parameter for the <code>gotoAndPlay()</code> method.</p>
<p>Does that make sense?</p>
<p>Check out my reply to Eric &#8212; the next reply, actually &#8212; to see suggested sample code.</p>
<p><strong>To Eric &#8230;</strong></p>
<p>Your question is pretty much like Jeremy&#8217;s, so I&#8217;ll provide a quick code sample for both of you.  Note, as I mentioned to Jeremy, this assumes you have a frame label in frame 1 of the destination scene.  In this example, the frame label is &#8220;destination&#8221; and the last cue point in the video is named &#8220;theEnd&#8221;:</p>
<p><em>FLVPlayback, assuming the instance name <code>videoPlayer</code></em></p>
<pre><code>var listener:Object = new Object();
listener.cuePoint = function(evt:Object):Void {
  if (evt.name == &quot;theEnd&quot;) {
    gotoAndPlay(&quot;destination&quot;);
  }
}
videoPlayer.addEventListener("cuePoint", listener);</code></pre>
<p><em>Non-component, assuming a <code>NetStream</code> instance named <code>ns</code></em></p>
<pre><code>ns.onCuePoint = function(evt:Object):Void {
  if (evt.name == &quot;theEnd&quot;) {
    gotoAndPlay(&quot;destination&quot;);
  }
}</code></pre>
<p>As an alternative, you can forego cue points and use the <code>NetStream.onStatus</code> event (assuming no FLVPlayback):</p>
<pre><code>ns.onStatus = function(info) {
  if (info.code == &quot;NetStream.Play.Stop&quot;) {
    gotoAndPlay(&quot;destination&quot;);
  }
};</code></pre>
<p><strong>To Mike &#8230;</strong></p>
<p>By chance, I happened to help someone on the Adobe forums today with <a href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&amp;catid=194&amp;threadid=1388386&amp;enterthread=y" class="external" target="_blank" rel="nofollow">this exact issue</a>.  Check out the thread, and write back if you have additional questions, but I think that should get you started.  <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Mike</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-250513</link>
		<pubDate>Wed, 20 Aug 2008 05:06:22 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points#comment-250513</guid>
					<description>David,
Quite an interting and helpful blog you have here. I am creating a Google Earth Flythru where at certain times I need the video to stop. While it's stopped the presenter can talk for as long as he/she wants until they press a keyboard button to continue playing and the next pause (cue point) is reached and the pause happens all over again. So, what I'm trying to ask is how do I trigger a Cue Point embedded in an FLV to make the FLV pause. Then when the user presses a key the FLV continues to play.  I'm using AS 3.0 and just completed a basic AS 3.0 three day course which is fresh in my mind but I'm having a problem getting any info on controlling the cue points. thanks, Mike</description>
		<content:encoded><![CDATA[<p>David,<br />
Quite an interting and helpful blog you have here. I am creating a Google Earth Flythru where at certain times I need the video to stop. While it&#8217;s stopped the presenter can talk for as long as he/she wants until they press a keyboard button to continue playing and the next pause (cue point) is reached and the pause happens all over again. So, what I&#8217;m trying to ask is how do I trigger a Cue Point embedded in an FLV to make the FLV pause. Then when the user presses a key the FLV continues to play.  I&#8217;m using AS 3.0 and just completed a basic AS 3.0 three day course which is fresh in my mind but I&#8217;m having a problem getting any info on controlling the cue points. thanks, Mike
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
