<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Help me forward to new page at end of Flash video</title>
	<link>http://ask.metafilter.com/75971/Help-me-forward-to-new-page-at-end-of-Flash-video/</link>
	<description>Comments on Ask MetaFilter post Help me forward to new page at end of Flash video</description>
	<pubDate>Sun, 11 Nov 2007 09:29:25 -0800</pubDate>
	<lastBuildDate>Sun, 11 Nov 2007 09:29:25 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Help me forward to new page at end of Flash video</title>
		<link>http://ask.metafilter.com/75971/Help-me-forward-to-new-page-at-end-of-Flash-video</link>	
		<description>How do I get Flash to play a FLV and then go to particular URL when it&apos;s done? &lt;br /&gt;&lt;br /&gt; I&apos;m working on a project where people view a Flash video (just an FLV file with no skin or anything else) and then get forwarded to another page when it&apos;s done.  I need them to see the whole video, so I can&apos;t just put a text link for the next page.  I don&apos;t know Flash especially well, and the code that I&apos;ve found online keeps giving me demands for an onClipEvent handler.  Ideas?</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2007:site.75971</guid>
		<pubDate>Sun, 11 Nov 2007 08:42:28 -0800</pubDate>
		<dc:creator>aaronetc</dc:creator>
		
			<category>flash</category>
		
			<category>web</category>
		
			<category>actionscript</category>
		
			<category>programming</category>
		
			<category>video</category>
		
			<category>flv</category>
		
	</item> <item>
		<title>By: Steven C. Den Beste</title>
		<link>http://ask.metafilter.com/75971/Help-me-forward-to-new-page-at-end-of-Flash-video#1128989</link>	
		<description>I think you load the FLV into the flash file, and play it using as many frames in the SWF as are in the FLV. In the last frame, you put an actionscript which contains a &quot;getURL&quot; function call. Or something along those lines.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.75971-1128989</guid>
		<pubDate>Sun, 11 Nov 2007 09:29:25 -0800</pubDate>
		<dc:creator>Steven C. Den Beste</dc:creator>
	</item><item>
		<title>By: ReiToei</title>
		<link>http://ask.metafilter.com/75971/Help-me-forward-to-new-page-at-end-of-Flash-video#1129006</link>	
		<description>You could always write a little javacsript with a timer that&apos;s the same length as the video, then a window.location redirect. Not an elegant sollution though.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.75971-1129006</guid>
		<pubDate>Sun, 11 Nov 2007 09:54:29 -0800</pubDate>
		<dc:creator>ReiToei</dc:creator>
	</item><item>
		<title>By: grumblebee</title>
		<link>http://ask.metafilter.com/75971/Help-me-forward-to-new-page-at-end-of-Flash-video#1129010</link>	
		<description>Yes, that would work. A more robust solution would be to code the whole thing in Actionscript (this would allow you to switch videos) and not use the timeline.&lt;br&gt;
&lt;br&gt;
It code will be slightly different, depending on whether you&apos;re using AS 2.0 (Flash 8 and 9) or AS 3.0 (Flash 9). I&apos;m going to assume that you&apos;re using Flash&apos;s flvPlayback component for video -- not because I like it (I don&apos;t) -- but because it will make this answer easier to write. Rolling-your-own-video-player, while a good idea, would derail this thread.&lt;br&gt;
&lt;br&gt;
So I&apos;m assuming a one-frame-long fla/swf with the flvPlayback component on stage, and I&apos;m also assuming that you&apos;ve given the component the instance name &quot;flvPlayer.&quot; Finally, I&apos;m going to assume AS 2.0.&lt;br&gt;
&lt;br&gt;
The code goes in frame one.&lt;br&gt;
&lt;br&gt;
var strVideoPath:String = &quot;http://path.to.video.flv&quot;;&lt;br&gt;
var strUrl:String = &quot;http://url.to.link.to.when.video.is.complete&quot;;&lt;br&gt;
var objFlvListener:Object = new Object();&lt;br&gt;
&lt;br&gt;
//see up functions to run when video is loaded&lt;br&gt;
//and complete&lt;br&gt;
objFlvListener.ready = readyFunction;&lt;br&gt;
objFlvListener.complete = completeFunction;&lt;br&gt;
flv.addEventListener(&quot;ready&quot;, objFlvListener);&lt;br&gt;
&lt;br&gt;
//start the ball rolling by loading the video&lt;br&gt;
flv.autoPlay = false; //make sure readyFunction controls play&lt;br&gt;
flv.contentPath = strVideoPath; //see above&lt;br&gt;
&lt;br&gt;
function readyFunction(objEvent:Object):Void&lt;br&gt;
{&lt;br&gt;
flv.play();&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
function completeFunction(objEvent:Object):Void&lt;br&gt;
{&lt;br&gt;
getUrl(strUrl);&lt;br&gt;
}</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.75971-1129010</guid>
		<pubDate>Sun, 11 Nov 2007 10:00:09 -0800</pubDate>
		<dc:creator>grumblebee</dc:creator>
	</item><item>
		<title>By: aaronetc</title>
		<link>http://ask.metafilter.com/75971/Help-me-forward-to-new-page-at-end-of-Flash-video#1129041</link>	
		<description>I don&apos;t know why I didn&apos;t think to just extend the timeline and put getURL in the last frame, but that worked fine, even though I wouldn&apos;t want to do it on any kind of large rollout.  grumblebee&apos;s script is close to what I was finding elsewhere (relying on the &quot;complete&quot; event), so I&apos;ll give that a try as well, since I&apos;ll probably have to do this again.  Thanks, all.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.75971-1129041</guid>
		<pubDate>Sun, 11 Nov 2007 10:38:21 -0800</pubDate>
		<dc:creator>aaronetc</dc:creator>
	</item><item>
		<title>By: Steven C. Den Beste</title>
		<link>http://ask.metafilter.com/75971/Help-me-forward-to-new-page-at-end-of-Flash-video#1129087</link>	
		<description>Using a long timeline is a brute force solution, but it&apos;s easy. As we engineers say, &quot;A stupid solution that works isn&apos;t stupid.&quot;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.75971-1129087</guid>
		<pubDate>Sun, 11 Nov 2007 11:17:31 -0800</pubDate>
		<dc:creator>Steven C. Den Beste</dc:creator>
	</item>
	</channel>
</rss>
