Copy link to clipboard
Copied
Hello,
I need a scrol bar to slow down a video file (video and audio)
Thank you.
Copy link to clipboard
Copied
you can use the paramF to calculate the parameters needed to associate the scrollbar's position with the video's position. is your video being played in an flvplayback component?
function paramF(mc:MovieClip,x1:Number,y1:Number,x2:Number,y2:Number):void{
mc.m=(y1-y2)/(x1-x2);
mc.b=y1-mc.m*x1;
}
Copy link to clipboard
Copied
Thanks for you kindly reply.
I do some test but I am new to As3, so could you write a short complete script please?
I did some testing and I think slow down with FLVPlayback component is not possible, is that right? So if there are no alternatives, my intention would be to use the time line.
Keep in mind that I have to slow down video and audio simultaneously.
Thanks a lot.
Copy link to clipboard
Copied
you want a video to play at something other than its native framerate?
if yes, you can't easily do that with an flvplayback component. you'll need to separate the audio and visual parts of your video and had them to a movieclip timeline. then you'll need to customize the playback speed of that movieclip.
you can use the following to play any movieclip (forward or backward) at any speed:
function playF(mc:MovieClip, m:int, n:int, fps:int):void {
var playFFF2:Function = function(mc:MovieClip):void {
trace(getTimer(),mc.currentFrame);
if (mc.m<mc.n) {
mc.nextFrame();
} else {
mc.prevFrame();
}
if (mc.currentFrame == mc.n) {
clearInterval(mc.int);
}
//updateAfterEvent();
};
mc.m = m;
mc.n = n;
mc.fps = fps;
mc.gotoAndStop(mc.m);
clearInterval(mc.int);
mc.int = setInterval(playFFF2, 1000/mc.fps, mc);
}
// and to stop it:
function stopF(mc:MovieClip):void {
clearInterval(mc.int);
}
Copy link to clipboard
Copied
Thank you Kglad,
I tried the script, but apparently I make some mistakes,
keep in mind that I am a newbie of flash, I would be grateful if you could attach a .fla.
Thank you again very much
Copy link to clipboard
Copied
nothing was attached.
in addition, i don't download and correct files unless i'm hired.
free help i offer via the adobe forums and this problem is simple enough it can probably be solved in this forum.
if you want to hire me, send an email via http://www.kglad.com. to solve in this forum, copy and paste the code you're using.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now