all groups > flash actionscript > december 2005 >
You're in the

flash actionscript

group:

MediaDisplay simple AS rewind...?


MediaDisplay simple AS rewind...? abeall
12/19/2005 9:27:27 PM
flash actionscript: I am using the MediaDisplay comp to stream some FLVs in a project. I now need a
simple rewind button(no fastforward). Here's what I currently have sitting on
my very broken rewind button:
on (release) {
//_parent.video.pause();
var m = _parent.video.playheadTime-5;
trace(_parent.video.playheadTime + "/" + m);
_parent.video.stop();
_parent.video.play(Number(m));
}

The issue is that, no matter what I try, the Media doesn't go to the correct
location. Example:

I press rewind between 5 and 6 seconds of playback(I'm tracing playbackTime
onEnterFrame at another place), and it goes to 10 seconds. What's wrong?
Besides the onEnterFrame and the above code, there is nothing but a few
container clips and the MediaDisplay. It is being masked.
Re: MediaDisplay simple AS rewind...? abeall
12/19/2005 10:54:03 PM
Found the problem. Keyframes. You can't control send the playhead to anywhere besides an encoded keyframe, and it rounds the playhead to the nearest keyframe. Yar.

AddThis Social Bookmark Button