

































<?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 Fast Forward and Rewind Video (FLV) Content</title>
	<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video</link>
	<description>Luck is the residue of good design.</description>
	<pubDate>Wed, 08 Feb 2012 15:17:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: JHall</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-473320</link>
		<pubDate>Fri, 30 Jul 2010 13:45:02 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-473320</guid>
					<description>Hi! Thanks for this. Its very helpful indeed.  I am currently using actionscript cue points to move a program along to sections with one long video. If I use this code to FF and RW, will the actionscript cue points be broken, and how can I get around this?
Thanks so much.   -JHall</description>
		<content:encoded><![CDATA[<p>Hi! Thanks for this. Its very helpful indeed.  I am currently using actionscript cue points to move a program along to sections with one long video. If I use this code to FF and RW, will the actionscript cue points be broken, and how can I get around this?<br />
Thanks so much.   -JHall
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Andy Cheng</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-402960</link>
		<pubDate>Sun, 12 Jul 2009 12:17:07 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-402960</guid>
					<description>i need help with this actionscript. i dont know why my play button,pause,button,and rewindbutton its not working ,but the video working.i hope anyone can help me out this
This my actionscript code:

video.setMedia(&quot;because i am girl.flv&quot;, &quot;FLV&quot;);
video = _root.video;
//play button function
play_btn.onRelease = function() {
video.play();
};
//pause button function
pause_btn.onRelease = function() {
video.pause();
};
//fullscreen function
fullscreen_btn.onRelease = function() {
video.displayFull();
toggleFullScreen();
};
 
//rewind function, stop(0) can also be used.
rewind.onRelease = function() {
video.play(0);
};
 
//mute and unmute
mc_volume.onRelease = function() {
mc_volume.play();
};
 
//This part is for the fullscreen function
Stage.scaleMode=&quot;Scale&quot;;
Stage.align = &quot;TC&quot;;  //T:top, C: center
function toggleFullScreen(){
if(Stage[&quot;displayState&quot;]==&quot;normal&quot;){
Stage[&quot;displayState&quot;]=&quot;fullScreen&quot;;
fullscreen_btn.gotoAndStop(2);
}else{
Stage[&quot;displayState&quot;]=&quot;normal&quot;;
fullscreen_btn.gotoAndStop(1);
}
}
video = _root.video;
mc_knob.onPress = function() {
mdown = true;
this.startDrag(false, 0, 0, mc_track._width, 0);
};
mc_knob.onRelease = function() {
mdown = false;
this.stopDrag();
};
mc_knob.onReleaseOutside = mc_knob.onRelease();
this.onEnterFrame = function() {
if (mdown) {
dist = mc_knob._x;
pct = dist/mc_track._width;
newVol = pct*video.totalTime;
video.playheadTime = newVol;
} else {
dist = video.playheadTime;
pct = dist/video.totalTime;
newX = pct*mc_track._width;
mc_knob._x = newX;
}
};</description>
		<content:encoded><![CDATA[<p>i need help with this actionscript. i dont know why my play button,pause,button,and rewindbutton its not working ,but the video working.i hope anyone can help me out this<br />
This my actionscript code:</p>
<p>video.setMedia(&#8221;because i am girl.flv&#8221;, &#8220;FLV&#8221;);<br />
video = _root.video;<br />
//play button function<br />
play_btn.onRelease = function() {<br />
video.play();<br />
};<br />
//pause button function<br />
pause_btn.onRelease = function() {<br />
video.pause();<br />
};<br />
//fullscreen function<br />
fullscreen_btn.onRelease = function() {<br />
video.displayFull();<br />
toggleFullScreen();<br />
};</p>
<p>//rewind function, stop(0) can also be used.<br />
rewind.onRelease = function() {<br />
video.play(0);<br />
};</p>
<p>//mute and unmute<br />
mc_volume.onRelease = function() {<br />
mc_volume.play();<br />
};</p>
<p>//This part is for the fullscreen function<br />
Stage.scaleMode=&#8221;Scale&#8221;;<br />
Stage.align = &#8220;TC&#8221;;  //T:top, C: center<br />
function toggleFullScreen(){<br />
if(Stage[&#8221;displayState&#8221;]==&#8221;normal&#8221;){<br />
Stage[&#8221;displayState&#8221;]=&#8221;fullScreen&#8221;;<br />
fullscreen_btn.gotoAndStop(2);<br />
}else{<br />
Stage[&#8221;displayState&#8221;]=&#8221;normal&#8221;;<br />
fullscreen_btn.gotoAndStop(1);<br />
}<br />
}<br />
video = _root.video;<br />
mc_knob.onPress = function() {<br />
mdown = true;<br />
this.startDrag(false, 0, 0, mc_track._width, 0);<br />
};<br />
mc_knob.onRelease = function() {<br />
mdown = false;<br />
this.stopDrag();<br />
};<br />
mc_knob.onReleaseOutside = mc_knob.onRelease();<br />
this.onEnterFrame = function() {<br />
if (mdown) {<br />
dist = mc_knob._x;<br />
pct = dist/mc_track._width;<br />
newVol = pct*video.totalTime;<br />
video.playheadTime = newVol;<br />
} else {<br />
dist = video.playheadTime;<br />
pct = dist/video.totalTime;<br />
newX = pct*mc_track._width;<br />
mc_knob._x = newX;<br />
}<br />
};
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-393133</link>
		<pubDate>Tue, 19 May 2009 14:45:36 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-393133</guid>
					<description>&lt;strong&gt;To Chris ...&lt;/strong&gt;

Thanks for your note.  That's good thinking!

&lt;strong&gt;To Oscar ...&lt;/strong&gt;

If you check out the sample files from the &quot;Building Stuff&quot; chapter in Tom's and my &lt;em&gt;Foundation Flash CS4 for Designers&lt;/em&gt;, you'll find a working AS3 example of what you're after.  The basic principle is the same, but as you can imagine, the syntax changes a bit.  The sample files are here:

&lt;a href=&quot;http://www.foundationflashcs4.com/sample-files.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.foundationflashcs4.com/sample-files.html&lt;/a&gt;

... and you're looking for Chapter 14.  Note the alternative URL, in case the server server chokes on you:

&lt;a href=&quot;http://www.friendsofed.com/download.html?isbn=9781430210931&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.friendsofed.com/download.html?isbn=9781430210931&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p><strong>To Chris &#8230;</strong></p>
<p>Thanks for your note.  That&#8217;s good thinking!</p>
<p><strong>To Oscar &#8230;</strong></p>
<p>If you check out the sample files from the &#8220;Building Stuff&#8221; chapter in Tom&#8217;s and my <em>Foundation Flash CS4 for Designers</em>, you&#8217;ll find a working AS3 example of what you&#8217;re after.  The basic principle is the same, but as you can imagine, the syntax changes a bit.  The sample files are here:</p>
<p><a href="http://www.foundationflashcs4.com/sample-files.html" target="_blank" rel="nofollow"><a href='http://www.foundationflashcs4.com/sample-files.html' rel='nofollow'>http://www.foundationflashcs4.com/sample-files.html</a></a></p>
<p>&#8230; and you&#8217;re looking for Chapter 14.  Note the alternative URL, in case the server server chokes on you:</p>
<p><a href="http://www.friendsofed.com/download.html?isbn=9781430210931" target="_blank" rel="nofollow"><a href='http://www.friendsofed.com/download.html?isbn=9781430210931' rel='nofollow'>http://www.friendsofed.com/download.html?isbn=9781430210931</a></a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Oscar Diaz</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-392058</link>
		<pubDate>Thu, 14 May 2009 20:01:03 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-392058</guid>
					<description>Great work David.
As all the people here, I'm trying to figure out the fast forward and rewind buttons for the player in AS3 without success :( Can anyone give me a light??
Thanks!</description>
		<content:encoded><![CDATA[<p>Great work David.<br />
As all the people here, I&#8217;m trying to figure out the fast forward and rewind buttons for the player in AS3 without success <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Can anyone give me a light??<br />
Thanks!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Chris</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-387005</link>
		<pubDate>Tue, 28 Apr 2009 18:08:18 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-387005</guid>
					<description>Hi David.

Great work here.  I've recently hired on with a company using AS2 for eLearning content (I'm an AS3 guy by nature) and have introduced them to the idea of using progressive downloads rather than embedded video content in their swfs.

What a surprise I had when I found out that the FF and RW buttons on Flash's default component skins (for a rapid prototype of the concept) don't represent the functionality that their icons suggest!

Anyhow, found your blog post just in time here.  Was having trouble using the flvplayback.time but you nailed that one on the head!  

One tip - I was having an issue where the video would seek for a time after releasing the ff button.  As a workaround, setting your interval to match your flvplayback.progressInterval smooths this out even, as you don't have 'backlogged' seek events piling up.

Cheers and many thanks!
Chris</description>
		<content:encoded><![CDATA[<p>Hi David.</p>
<p>Great work here.  I&#8217;ve recently hired on with a company using AS2 for eLearning content (I&#8217;m an AS3 guy by nature) and have introduced them to the idea of using progressive downloads rather than embedded video content in their swfs.</p>
<p>What a surprise I had when I found out that the FF and RW buttons on Flash&#8217;s default component skins (for a rapid prototype of the concept) don&#8217;t represent the functionality that their icons suggest!</p>
<p>Anyhow, found your blog post just in time here.  Was having trouble using the flvplayback.time but you nailed that one on the head!  </p>
<p>One tip - I was having an issue where the video would seek for a time after releasing the ff button.  As a workaround, setting your interval to match your flvplayback.progressInterval smooths this out even, as you don&#8217;t have &#8216;backlogged&#8217; seek events piling up.</p>
<p>Cheers and many thanks!<br />
Chris
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-349286</link>
		<pubDate>Fri, 13 Feb 2009 02:01:27 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-349286</guid>
					<description>&lt;strong&gt;To David ...&lt;/strong&gt;

&lt;blockquote&gt;Have you tried this with h.264 video content?&lt;/blockquote&gt;

Gosh, my reply is soooo late!  I'm truly sorry, man.   As it turns out, I have tried this with H.264 content, and the principle I described above works.  (Tom Green and I included an AS3 version in our recent &lt;em&gt;Foundation Flash CS4 for Designers&lt;/em&gt; [friends of ED], in the &quot;Building Stuff&quot; chapter.)  The trick is to vary your timers until you find a looping speed that works with the framerate of your video &amp;#8212; and that's true even for non H.264 content.

&lt;strong&gt;To John ...&lt;/strong&gt;

I apologize to you, too, for such a tardy reply.

If I understand your question, you're asking if it's possible to play video content in reverse, right?  If that's it, then I'm afraid I haven't been able to make that work ... not anymore smoothly than the simulated rewind feature I described above.

&lt;strong&gt;To Zack ...&lt;/strong&gt;

Thanks!

&lt;strong&gt;To Will ...&lt;/strong&gt;

&lt;blockquote&gt;it seems everyone out there is so hung up on components!!&lt;/blockquote&gt;

Heh, they are convenient, for sure!  But there's a price for everything.

&lt;blockquote&gt;I’m wondering can you explain how to do the above for embedded video?&lt;/blockquote&gt;

The think about embedded (internal) video is that it ceases to act like a genuine video object, and the reason for that is because it gets laid out, for as many frames as necessary, inside a movie clip.  At that point, it effectively becomes an instance of the &lt;code&gt;MovieClip&lt;/code&gt; class.  So to fast forward, you would use your timer to skip ahead in that video movie clip's timeline by more than one frame at a time (see &lt;code&gt;MovieClip.gotoAndPlay()&lt;/code&gt;).  To rewind, you invoke that same method (or &lt;code&gt;MovieClip.gotoAndStop()&lt;/code&gt;) and send the video's movie clip timeline backwards.

Technically, this &lt;em&gt;is&lt;/em&gt; doable ... but you tend to lose considerable of accuracy because of variances between the video framerate and the FLA framerate.  In addition, you can quickly run beyond the 16,000 frame limit in Flash if the video runs long.  Consider a 24fps FLA with a 12-minute video.  If the video is also 24fps, it needs 17,280 frames to play out (12 minutes is 720 seconds, times 24).  I've also found that the audio of large and/or long videos eventually gets out of sync with the video.  So unless your clips are relatively short, you may find yourself up the creek ... not &lt;em&gt;without&lt;/em&gt; a paddle, but with a poorly made paddle.</description>
		<content:encoded><![CDATA[<p><strong>To David &#8230;</strong></p>
<blockquote><p>Have you tried this with h.264 video content?</p></blockquote>
<p>Gosh, my reply is soooo late!  I&#8217;m truly sorry, man.   As it turns out, I have tried this with H.264 content, and the principle I described above works.  (Tom Green and I included an AS3 version in our recent <em>Foundation Flash CS4 for Designers</em> [friends of ED], in the &#8220;Building Stuff&#8221; chapter.)  The trick is to vary your timers until you find a looping speed that works with the framerate of your video &mdash; and that&#8217;s true even for non H.264 content.</p>
<p><strong>To John &#8230;</strong></p>
<p>I apologize to you, too, for such a tardy reply.</p>
<p>If I understand your question, you&#8217;re asking if it&#8217;s possible to play video content in reverse, right?  If that&#8217;s it, then I&#8217;m afraid I haven&#8217;t been able to make that work &#8230; not anymore smoothly than the simulated rewind feature I described above.</p>
<p><strong>To Zack &#8230;</strong></p>
<p>Thanks!</p>
<p><strong>To Will &#8230;</strong></p>
<blockquote><p>it seems everyone out there is so hung up on components!!</p></blockquote>
<p>Heh, they are convenient, for sure!  But there&#8217;s a price for everything.</p>
<blockquote><p>I’m wondering can you explain how to do the above for embedded video?</p></blockquote>
<p>The think about embedded (internal) video is that it ceases to act like a genuine video object, and the reason for that is because it gets laid out, for as many frames as necessary, inside a movie clip.  At that point, it effectively becomes an instance of the <code>MovieClip</code> class.  So to fast forward, you would use your timer to skip ahead in that video movie clip&#8217;s timeline by more than one frame at a time (see <code>MovieClip.gotoAndPlay()</code>).  To rewind, you invoke that same method (or <code>MovieClip.gotoAndStop()</code>) and send the video&#8217;s movie clip timeline backwards.</p>
<p>Technically, this <em>is</em> doable &#8230; but you tend to lose considerable of accuracy because of variances between the video framerate and the FLA framerate.  In addition, you can quickly run beyond the 16,000 frame limit in Flash if the video runs long.  Consider a 24fps FLA with a 12-minute video.  If the video is also 24fps, it needs 17,280 frames to play out (12 minutes is 720 seconds, times 24).  I&#8217;ve also found that the audio of large and/or long videos eventually gets out of sync with the video.  So unless your clips are relatively short, you may find yourself up the creek &#8230; not <em>without</em> a paddle, but with a poorly made paddle.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Will</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-348494</link>
		<pubDate>Tue, 10 Feb 2009 21:23:52 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-348494</guid>
					<description>after searching the web on how to load and manage FLV files without the use of the FLVPlayback Component I finally made to your blog... sanctuary at last : ) - it seems everyone out there is so hung up on components!!

I'm wondering can you explain how to do the above for embedded video? - I have to deploy a stand-alone exe file and as am sure you know externally called flv and components will need to accompanied the exe, which of course defeats the whole purpose of creating a stand-alone exe file.

if you can point me in the direction where I can find the solution to the above issue or any help would be greatly appreciated.</description>
		<content:encoded><![CDATA[<p>after searching the web on how to load and manage FLV files without the use of the FLVPlayback Component I finally made to your blog&#8230; sanctuary at last : ) - it seems everyone out there is so hung up on components!!</p>
<p>I&#8217;m wondering can you explain how to do the above for embedded video? - I have to deploy a stand-alone exe file and as am sure you know externally called flv and components will need to accompanied the exe, which of course defeats the whole purpose of creating a stand-alone exe file.</p>
<p>if you can point me in the direction where I can find the solution to the above issue or any help would be greatly appreciated.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Zack B</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-252760</link>
		<pubDate>Fri, 22 Aug 2008 16:13:42 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-252760</guid>
					<description>Hey dude, great article and great blog! Keep on coding brother!</description>
		<content:encoded><![CDATA[<p>Hey dude, great article and great blog! Keep on coding brother!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: John David Hutton</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-207557</link>
		<pubDate>Sat, 21 Jun 2008 20:34:24 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-207557</guid>
					<description>Hi David, I was reading through your excellent scripting article notes but wasn't sure if the reverse section is what I need or not. I currently have a flvplayback component in my flash AS 2.0 file I'm working with. I've made 3D renders so that we look at a layout and start in on each section when a button is pressed. All of that works great. The problem I'm having is that I'd like the same video to be reversed each time they hit a new link so we're taken back to the home position first before proceeding to the next section they clicked on. I'm not finding an easy way to reverse in the flvplayback component and wondered if you could comment on that?</description>
		<content:encoded><![CDATA[<p>Hi David, I was reading through your excellent scripting article notes but wasn&#8217;t sure if the reverse section is what I need or not. I currently have a flvplayback component in my flash AS 2.0 file I&#8217;m working with. I&#8217;ve made 3D renders so that we look at a layout and start in on each section when a button is pressed. All of that works great. The problem I&#8217;m having is that I&#8217;d like the same video to be reversed each time they hit a new link so we&#8217;re taken back to the home position first before proceeding to the next section they clicked on. I&#8217;m not finding an easy way to reverse in the flvplayback component and wondered if you could comment on that?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-199521</link>
		<pubDate>Wed, 11 Jun 2008 18:50:22 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video#comment-199521</guid>
					<description>Have you tried this with h.264 video content?  The ff and rewind buttons don't seem to work just right. Do you think it has to do with the metadata within the MPEG-4 file? I'd really like to get your ff and rewind method to work with MPEG-4 H.264 videos.  Thanks.</description>
		<content:encoded><![CDATA[<p>Have you tried this with h.264 video content?  The ff and rewind buttons don&#8217;t seem to work just right. Do you think it has to do with the metadata within the MPEG-4 file? I&#8217;d really like to get your ff and rewind method to work with MPEG-4 H.264 videos.  Thanks.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>

