Could any one point me in the direction of a tutorial on Controlling a Timeline with Slide Bar, if they know of one please? Have read soome stuff that says its possible but cant find out how to do it.
Cheers
Printable View
Could any one point me in the direction of a tutorial on Controlling a Timeline with Slide Bar, if they know of one please? Have read soome stuff that says its possible but cant find out how to do it.
Cheers
Please refer to my demo.
You may place the slider any where and scale it to any size without affecting its functionality at all.
If you want to change it to control MCs rather than main timeline, just change one line of code by replacing "_root." to "_root.YourMC"
Update:
Modify the following line:
fNum=int((nob._x-slot._x)/(slot._width-nob._width)*(totalFrame+1))+2;
to
fNum=int((nob._x-slot._x)/(slot._width-nob._width)*(totalFrame))+2;
Thanx websam,
much appreciated !
Hey Dave...
Nice tut btw.
I was wonderring if you can make the nob start at a certain frame in a mc in stead of having the nob at the beginning of the slot mc.
I made it so that i control a mc's timeline and not the main timeline.
Another problem...
When I drag the nob away/out of the slot mc, release button and move back to the slot area, the nob still sticks to the pointer. And i change the one line of actionscript as u wrote under update.
Hope I wrote it well enough. New to actionscript :S
Thx in advance
Christian
Hey there,
Use the previous sample I made, and change the script on frame 2 to the following:
It should work as you expectedCode:
nob._x = slot._x + slot._width/2;
nob._y = slot._y;
fNum = Math.ceil(this._totalframes/2);
_root.gotoAndStop(fNum)
nob.onPress=function(){
startDrag(nob,0,slot._x,slot._y,slot._width+slot._x-this._width,slot._y);
this.onEnterFrame=function(){
fNum=Math.ceil((this._x-slot._x)/(slot._width-this._width)*(_root._totalframes));
if(fNum <= 2) fNum = 3;
_root.gotoAndStop(fNum);
}
}
nob.onRelease = nob.onReleaseOutside = function(){
this.stopDrag();
delete this.onEnterFrame;
}
stop();
cheers
If you want to control your own MC on main timeline, all you need to do is to change _root.gotoAndStop(fNum) to your_MC.gotoAndStop(fNum)
and change _root._totalframes/this._totalframes to your_MC._totalframes
cheers
Hi,
I am trying to use this sample however I am finding problems to make the slide to move while the movie plays.
I have made something kinda oughul taking tue % of movement of the timeline and applying it to the slider but is not good.
Does anybody known how could I accomplish this movement and keep the slider working while grabbing it?
Thanks lot.
Jose
yeah, I'd really, really like to know how to do that too!
I need to have a movieclip playing and be able to go backward a forward in the timeline, exactly like in videos and music =)
please, please help!
WebSam, I used your slide control for a project prototype and was very pleased. The project may need to be in Actionscript 3 though... have you created a version for 3 at all? It's a wonderful thing and I like to try and keep it. Thanks, matt