I want to create a slider that can scrub through an animation...

...but I can't figure out  how the draggable slider would be put together. Does anyone know how this could be accomplished? Or are there any examples of how this would work?

In the interest of community code sharing, here's how I modified Darrell's code...
I had a 4-second animation, which I converted to a Symbol named "engine_anim". I also had a horizontal rectangle as the scrub bar, named "bar", and a scrub handle, also a rectangle, named "scrubber". The link to Darrell's code is in the Image Slider link above. This is how I changed it to do what I wanted, which is to scrub back and froth through my animation:
The following goes in the document.compositionReady Action:
var dragme = false;
$(function () {
   var scrubber = sym.$("scrubber");
   var bar = sym.$("bar");
    scrubber.mousedown(function() { dragme = true })
    $(document).mouseup(function() { dragme = false })
    $(document).mousemove(function(e) {
        if(dragme){
           var possibleX = e.pageX;
           var leftX = bar.offset().left;
           var rightX = (leftX + bar.width()) - scrubber.width();
           var scrubWidth = rightX - leftX;
            // confine it to the scrub bar width
            if(possibleX < leftX) {
                possibleX = leftX;
            if(possibleX > rightX) {
                possibleX = rightX;
            scrubber.offset({
             left: possibleX
            var relativeX = possibleX - leftX;
            var perc = Math.ceil((relativeX/scrubWidth) * 4000); // multiplying the ratio by 4000 milliseconds, the length of my animation
            sym.getComposition().getStage().getSymbol("engine_anim").stop(perc);

Similar Messages

  • I want to create fillable PDF that can be used by many people running on both MAC and PC.  What Adobe product should I use?

    want to create fillable PDF that can be used by many people running on both MAC and PC.  What Adobe product should I use?

    Hans-Gunter
    Thanks so much.  I downloaded Acrobat XI.  It's been "extracting" for the past 30 minutes (even with a fast wi-fi).  Hope this is not a problem.
    Anne

  • I want to create a newlsetter that can be printed, emailed and downloadable on a website.

    Is it as simple as saving the newsletter in different formats? What are the steps I need to take so that the newsletter can be printed, emailed and used on a website?
    Thanks

    A PDF will fit the bill.

  • How to create a user that can login the LDAP?

    I want to create a user that can login the OID/LDAP. I know how to create a user, it is allowed to login OIDDAS, but I also want the user to grant access to ldap directly. How do i do that?
    And how can I give it read rights and or update/delete rights on a specific tree?
    Regards
    Eelco

    Eelco,
    did you see the OiD developers guide? Here you find some examples how to create users in OiD using pl/sql or java.
    http://download-west.oracle.com/docs/cd/A97329_03/manage.902/a95193/smplcode.htm#637294
    how to use directory access control can be found in
    http://download-west.oracle.com/docs/cd/A97329_03/manage.902/a95192/access.htm#1054232
    --Olaf

  • How do i create a stensil that can be added into diffrent files of adobe reader?

    I want to create a stencil that can be used in multiple adobe files for quality check purpose. Will be helpfull if somebody helps me out on this.

    why are you saying
    Pat Willener wrote:
    Please stay in your own topic, and answer the questions asked!

  • Can I create a slide that when updated, updates all my projects?

    I have a ending page to about 100 project software videos that is the same.  Currently if I need to change something on this slide, I have to do it 100 times.  Can I set up a slide that can be updated onve but updates all the projects it is used in?  Thanks in advance.

    Hi there
    That's a neat idea, but it's not really possible. Each project has a life of its own and must be compiled in order to create the output. So each project has to be updated, then compiled again to reflect the changes.
    I do suppose one way around it *MIGHT* be to use a widget or something that would present a common file at the end. Perhaps the Web Object? Who knows... maybe someone has created a widget that will simply present an image that is outside the compiled project.
    In thinking about that, I did a quick Google search. See what you think of the link below:
    Click here to view
    Cheers... Rick

  • I want to create a form that I can change at an instance that will store the information without replacing it

    I want to create a form that I can change at an instance that will store the information without replacing it: Here are examples of what i have:
    This is the form:  The True/False in column B are actually check boxes
    Date
    Job Name
    Start
    End
    Hours Worked
    Per Diem
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    Arellano, Paul
    TRUE
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    0.00
    Blackwell, Zach
    FALSE
    Christian, Charles
    TRUE
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    0.00
    Christian, John
    FALSE
    Currence, John
    FALSE
    Curtis, Brandon
    FALSE
    Hawkins, Tyre
    FALSE
    King, Corey
    FALSE
    Nunez, Jose
    FALSE
    Rangel, Antonio
    FALSE
    Rice, Eric
    FALSE
    Salgado, Ricardo
    FALSE
    and the sheet that the index to looks like:
    Saturday, Mar 15, 2014
    Rice, Eric
    Providence College
    9:00 AM
    7:30 PM
    10.50
    1
    Saturday, Mar 15, 2014
    Rice, Eric
    Virginia Beach
    7:30 PM
    2:30 AM
    7.00
    Saturday, Mar 15, 2014
    Salgado, Ricardo
    0.00
    Sunday, Mar 16, 2014
    Arellano, Paul
    Providence College
    7:00 AM
    8:00 PM
    13.00
    1
    Sunday, Mar 16, 2014
    Blackwell, Zach
    0.00
    Sunday, Mar 16, 2014
    Christian, Charles
    0.00
    Sunday, Mar 16, 2014
    Christian, John
    0.00
    Sunday, Mar 16, 2014
    Currence, John
    Providence College
    7:00 AM
    8:00 PM
    13.00
    1
    Sunday, Mar 16, 2014
    Curtis, Brandon
    0.00
    I want to be able to fill out the form and it place itself into Sheet 1 without changing everytime.  I can index the array from the form, but it changes everytime.

    You think it would be the other way around.
    Just speculation, but forms probably came to iOS first because of likely use for data entry in the field that syncs back to the Mac.  On a small screen with a touch interface, forms make inputing values easier.
    On the Mac, with its bigger screen, typing directly into a data table often works well enough.
    SG

  • I want to create a form that i can drop pictures in a certain place

    i want to create a form that i can drop pictures into

    Unfortunately Formscentral does not support drag and drop pictures into your form. If you want to form filler submit their images with other form data, you can use file attachment field. Add an file attachment field when design form, so that form filler can add their image file into it and submit with other form data.
    Thanks,
    Pengpeng Sun

  • I want to create an array that goes into a case structure where each element in the array is an individual case and gets done in order

    I want to create an array that goes into a case structure where each element in the array is an individual case and gets done in order. Any ideas, I've been playing with the idea but have had no luck, is this even possible?

    Hi,
    Please check it out the attached Vi.. Is this you need?
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney
    Attachments:
    Event.vi ‏11 KB

  • How to create a JButton that can run other Apps?

    Hi, Every1
    i want to create a JButton which can let the user click it and it runs a
    specified installed app in the system ( say, a JButton that fires up MS
    Outlook). how can i do that?
    thank you very much.
    Yu.

    hi, if i want to execute some kind of the following, how would i handle it?
    mailto:[email protected]
    i tried: Runtime.getRuntime().exec("mailto:[email protected]");
    but it gave me java.io.IOException: CreateProcess: mailto:[email protected] error=2
    i think this problem would be relatively easy but i just cant figure out.
    thanks

  • If i have an Apple account with monay in it and i want to creat a new account can i transfer the money from the old account to the new account ?

    if i have an Apple account with monay in it and i want to creat a new account can i transfer the money from the old account to the new account ?

    If the money contains a completely unspent balance from an iTunes gift card, the iTunes Store staff can put that money back onto the card.
    (89393)

  • I want to create an app.  Can you tell me the difference between iOS developer program and the mac developer program?

    I want to create an app.  Can you tell me the difference between iOS developer program and the mac developer program?
    Is the difference the device you're creating your app on, or for?

    iOS Developer Program is only for those who wish to develop iDevice apps. Mac program is for those only developing Mac applications. If you wish to do both, then you need to enroll in both programs.

  • Whats the best software for photo editing and creating product catalogues that can be saved as PDF's

    Whats the best software for photo editing and creating product catalogues that can be saved as PDF's

    You are asking two different questiions:
    1. What's a good photo editor? Answer to that here is probably obvious.
    2. What's a good desktop publishing/page layout program for creating PDF files for production? Answer, not PSE. It's a photo editor, not a page layout program.

  • I want to build a website that can send out email automatically using c#

    I want to build a website that can send out email automatically using c# and sql server when a date has reached. I have googled but nothing works.
    http://www.quartz-scheduler.net/documentation/quartz-2.x/tutorial/using-quartz.html
    I came across this, but I am still unsure what to do. 

    I came across this, but I am still unsure what to do
    http://forums.asp.net/

  • If I want to create a Group that is Group by page,Is that feasible?

    Hi, Expert
    I want to limit record number(50 records) per page,
    and it will have a total column which is amount Salary,
    so now I had set some formulas into report
    First(in report Details)
    WhilePrintingRecords;
    Global   numbervar   DataCount   :=   DataCount   +   1;
    ps.This variable counts record number and limits record within 50 records per page
       when record passover 50, it will re-set variable to 0(this formulas set in Group Footer)
    second(in Group Footer)
    WhilePrintingRecords;
       Global numbervar DataCount := 0;
    ps.for re-set variable
    third(New Page After)
    Truncate ({@DataCount}/50)*50={@DataCount} and OnLastRecord=false
    ps.For Next page
    Fourth
    WhilePrintingRecords;
    Global numbervar pagetol;
       salarytol:=salarytol +{table;1.amount}  
    Fifth
    Global numbervar pagetol;
    if (Truncate ({@DataCount}/50)*50)={@DataCount} then
       pagetol:=0;
    If I want to create a Group that is Group by page(50 records per page), because I want
    to grand total of salary per page,Is that feasible?
    How to achieve this goal??
    Thanks & Regards

    Thanks lanWaterMan
    Actually, my care is Report View,
    my report will have Three Summary columns,
    one is for 50 records,
    second is for data type,
    another is for all of records.
    I will put the First Summary column behind(below) the last records
    So it will look like "Grand total"(for 50 records 1 total).
    And the Second Summary column will lay on Group footer(sum data group by data type).
    And the last Summary column will lay on every page's bottom(sum all of data).
    If I put first summary column in page footer, It will lay on bottom of page, not behind the last records(per fiftieth record).
    So I think if I create group1 for 50 records(put in first Summary column on group1 footer) and group2 for data type(put in second Summary column on group2 footer),
    then put the last summary column into page footer. Maybe, it will look like what i want.
    Thanks & Regards

Maybe you are looking for