Copy link to clipboard
Copied
Hi there,
I have checked a few posts about controlling the timeline with a slider but I am afraid they may be a bit too advanced for me.
Would anyone recommend a post or a resource which explains the simplest way to have a slider that controls the timeline.
Just the simplest case.
Thank you in advance
B
// UPDATE (10/26/2018): improved version that takes into account responsive settings, drag offset and frame to position precision.
The download link is the same.
...this.button.on("mousedown", function(e)
{
e.target.offsetX = (e.stageX / stage.scaleX) - e.target.x;
}.bind(this));
this.button.on("pressmove", function(e)
{
e.target.x = this.clamp((e.stageX / stage.scaleX) - e.target.offsetX, this.bar.x, this.bar.x + this.bar.nominalBounds.width);
this.setProportion();
}.bind(this));
this.setPropo
Copy link to clipboard
Copied
Dear Kglad
Sorry for the confusion, from what I understand from this forum question, it has two parts one constructing the slider, two is moving the moving clip relative to the slider. The code I copied was JoaoCesar response to the slider part, I do want to move a movie clip relative to the slider position, but cant get the slider part to work proplerly as when I change JoaoCesar script to "y" rather than "x". the slider button flies to the top left of the screen and stops, there is no warning in the console of any errors. I hope that clears up what I would like help with, I am sure once I get the slider working your code will work for the movie clip part.
Best Regards Peter
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks Kglad
I found my problem was due to the clamping function, my scope was wrong . the movie clip I was trying to reference
was inside another clip so the stage referencing was wrong as one showed 8 in y the other 592 in y so the
refencing would not work. Appreciate your help best regards'
Peter
Copy link to clipboard
Copied
so, problem's resolved?
Copy link to clipboard
Copied
Yes thanks for your help
Peter
Copy link to clipboard
Copied
excellent. and you're welcome.