Scroll Timeline in a Div?

Example: http://www.bartmclaughlin.com/scroll_div/scroll_div_v1.html
Edge project: https://www.yousendit.com/download/elNJc2ZOR0Y1R1BWUThUQw
Now I want to control the timeline of a symbol on the stage using scroll. I’ve posted an example above, with a button that scrolls down the div.
I don’t know how to simultaneously scrub the div’s timeline when scrolling in the div.
This code below (that I got from Tim Jaramillo’s post here: http://forums.adobe.com/message/5058756#5058756) will scrub the timeline of the Stage when it’s placed in the Stage.scroll event, but I don’t know how to use it to scrub the timeline of my symbol.
var myCalc = e.currentTarget.scrollTop/(e.currentTarget.scrollHeight-e.currentTarget.clientHeight);
var pos = Math.round( myCalc * sym.getDuration() );
sym.stop(pos);
This question is similar to my question here: http://forums.adobe.com/message/6263651#6263651
that was answered by hemanth kumar r. Thank you!
bart

Hi there,
Here is an example:
http://www.timjaramillo.com/code/edge/scroll_div_scrub_timeline/
Here is the source:
www.timjaramillo.com/code/edge/_source/scroll_div_scrub_timeline.zip
Since you aren't using the Stage.scroll method, you shouldn't put your code in that event. I think there was some confusion there.
1) So, start by removing your code from Stage.scroll event.
2) Place the below code on your button click event (calls function on Stage.compositionReady):
sym.getComposition().getStage().onClick();
3) Place the below code on Stage.compositionReady:
// timer constantly runs to check scroll position, and handle timeline scrubbin'
var timerScroll = setInterval(function() {
          sym.scrubTimelineScroll();
}, 10);
// this function is called on click of your button
sym.onClick = function()
     sym.$("parent").animate({scrollTop:500},750);
sym.scrubTimelineScroll = function()
// calulate percent scrolled
          var myCalc = sym.$("parent").scrollTop()/sym.$("parent")[0].scrollHeight;
   // get percent of timeline length
          var pos = Math.round( myCalc * sym.getSymbol('parent').getDuration() );
//scrub timeline
          sym.getSymbol('parent').stop(pos);

Similar Messages

  • Focus vertical scroll bar in report div

    Hi everyone,
    I just want to know if the issue has been resolved by someone :
    I have a report within a div and a vertical scrolling bar to scroll the rows. When I click on a row of the report the row is highlighted. Now, if the clicked row is at the end of the report, the scrolling bar goes up, and the user has to scroll down to see the selected row. So how to focus this scrolling bar once the user clicks on the row ?
    I guess I have to compute the id of the selected row times the row height and send this value to the css parameter of the scroll bar (but AFAIK there's no such parameter in css for positioning a scroll bar) ... Someone has came up with a solution ?
    Best regards,
    Othman.

    Thanks a lot Andy,
    I didnt' know about the scrollTop attribute. So for those how are interested : Each time I click on a row, I store the scrollTop position in a Hidden field. On each body onload, I call a javascript function to position the scroll bar of the div like this :
    getElementById.("mydiv").scollTop = html_GetElement('P1_SCROLL_ID').value;
    Regards,
    Othman

  • Speedgrade 2014 crashing while scrolling timeline

    Hi there,
    I keep having issues with Speedgrade crashing randomly while scrolling timeline of videos.
    I'm using the latest version on an iMac running OSX 10.9.5
    It seems to be happening randomly, but so often it almost makes it unusable.

    Hi,
    I have the same poblem on iMac 27" late 2013 3,4 GHz i5 24 Gt 1600 MHz DDR3 NVIDIA GeForce GTX 775M. Same OSX 10.9.5.
    Scrolling timeline causes the crashes randomly. Using direct link or not doesn't seem to affect this.
    Br,
    Samuli

  • Create a scrolling timeline

    I'm looking for tutorials to create a scrolling timeline similar to the link below
    http://classic.motown.com/timeline/
    thanks for any help

    You may be able to find a tutorial by Googling "AS2 slider tutorial" and similar terms.  If you can follow the description below and you know how to code AS2, it may be enough to get you to a solution.
    The general approach involves having an object that acts like a slider which you assign startDrag and stopDrag methods to, for onPress and onRelease events, respectively.  The _x property of that slider object defines the _x of the image that it seems to make move via an enterframe event-based function that updates the image's position based on the slider's position.  The full distance that the slider moves would be relative to the full width of the image (a viewing area-width less since the image would not go completely to the left).  Essentially, if the slider is XX% of the way down its travelable distance, the image will also be XX% of the way down its travelable distance.

  • FCP7-scrolling timeline while playing?

    Hi I'm wondering if FCP7 has scrolling timeline while playing. It'd be worth the price of admission for that feature alone.
    M

    When FCP7 was first announced, I was sure I had seen a reference to scrolling in the new features described on the Apple website. But now that I have it, I don't see it in any menus or preferences or in the documentation. It's hard to believe they haven't added this feature long, long ago....it's not exactly rocket science.

  • CS4 - scroll timeline view to playhead

    I am in process of updating my systems from PPro2 to CS4.
    With the timeline selected:
    I mark both in and out points in the timeline. I use the hot key for "Go To In Point", then zoom in and the timeline view stays centered on the in point, moving the out point outside of timeline view.  If I use the hot key for "Go To Out Point" with the timeline selected, the playhead disappears as it moves to the right but the timeline view does not follow... it remains at the in point.
    With the Program Monitor selected:
    If I use the "Go To" buttons on the Program Monitor, the zoomed timeline view does jump to the playhead position as expected.
    Also If I have the Program Monitor selected instead of the timeline, the hot keys for the "GoTo' functions work as expected and the zoomed timeline view does jump to the playhead.
    It appears that with the timeline selected, a hot key command to "Go To' in or out does not scroll the timeline view as in PPro2.
    Am I missing something?

    It appears that with the timeline selected, a hot key command to "Go To' in or out does not scroll the timeline view as in PPro2.
    Sad, but true. I've taken to slapping the Space Bar twice to get the zoomed-in timeline view to move to general vicinity of the outpoint, after using the Go To Outpoint key command. Very annoying. It is a bug, I would say, so be sure to file a bug report. Not likely we'll see another update for CS4, but perhaps they'll see fit to rectify the problem for CS5 (or 6...).

  • Scrolling timeline

    I have a timeline full of symbols.
    Most of the symbols have nested buttons and symbols that responed to those buttons.
    I have the whole thing scrolling back and forth slowly.
    I want to be able to change the direction it scrolls relitive to the half of the project your mouse is hoverning over.
    I.E. hover over the right hand side and the timeline scrolls right and hover over the left hand side and it scrolls to the left.
    I can achieve this buy placing transperant symbols that cover each half of the stage and addind either play or play reverse respectively.
    But these transparent symbols block the symbols, buttons and such that i have below them.
    So then i thought i will put the transperant symbols towards the bottom of the heiracracy and as i suspected the symbols in front of the transperant buttons block them.
    is the some code i can add to the stage to achieve this?
    thanks a million

    Hi Marie,
    I had just marked two neighboring questions to answer to, but answered to the first in the thread of the second .
    Sure I need to get fresh air. I will right away : there are mushrooms growing around there these days
    Gil

  • Adobe changed how the mousewheel scrolls timeline in CS6...

    I scroll through the timeline alot using my mousewheel. In premiere CS5.5, if I position the mouse cursor over the timeline and use the mousewheel to scroll... I can get move the timeline from one side of the screen to the other in less than 8 mousewheel turns. And I can do a fast scroll if I position the mouse cursor over the scrollbar under the timeline... less than 3 mouse wheel turns.
    This worked great because I can scan through the audio waveforms of a 3 hour lecture really quickly.
    However, in Premiere CS6... it now takes 25 spins of the mouse wheel and they disabled fast scrolling.
    Is there a way to customize the mousewheel scrolll? Changing the mouse scroll wheel settings in Windows does nothing.
    This is the third annoying thing Adobe changed in CS6 that reduced the speed of my workflow.
    Grrrr

    Hi,
    For solution, use this program.
    http://www.desksoft.com/ScrollNavigator_Download.htm
    From Profile, click Add... button and find Adobe Premiere Pro.exe
    Click Get button (hold) and drag Premiere Pro Timeline.
    Bye.

  • Making sidebar fill colors "scroll" with main content div

    Just when I think this newbie is getting the hang of Dreamweaver, something throws me a curve
    I have a three column fixed layout designed in Dreamweaver CS4 at the URL below. Each of the two sidebars - left and right - has a fill color. I would like those sidebar fill colors to "scroll" or "flow" down as the content of the middle, main content div expands. As it is, the fill color of the two sidebars stops when their content stops, even if the middle content continues.
    I'm guessing I'm overlooking something simple here. Can someone tell me how to accomplish this?
    Many thanks in advance.
    http://firinglinedesign.com/mathieu/

    That is really ingenious! Many thanks for the lead. For anyone else who has this issue, while there are many links on Google, this is the first one I came across and it solved my problem.
    http://www.communitymx.com/content/article.cfm?cid=afc58
    Many thanks, Murray.

  • Audio Gone When Scrolling Timeline?

    Audio has suddenly disappeared when scrolling or fast forwarding thru the timeline, yet it plays fine at regular speed. Am I missing a setting?
    Thanks!

    Search is your friend - from earlier today: http://discussions.apple.com/thread.jspa?threadID=818655&tstart=0

  • Muse scrolling timeline

    Hi,
    I've been looking around for a function that would allow me to add a timeline/progress indicator when scrolling through a website.  I don't know if maybe I just don't know the correct name for what I'm wanting to do, or if the functionality doesn't exist, but I'm hoping you can help me out.
    I'm wanting to do something very much like what is at the bottom of the AQUATILIS EXPEDITION website.  If anyone can point me in the direction of a tutorial, or can just tell me what to do, it would be much appreciated.
    Thanks,
    Jake

    So, I've been looking around and found a resource that looks like it is what I want to do, but it involves jQuery, html, and css, which I have only a very small amount of experience with.  Is anyone familiar with how to integrate those in a muse website? 
    Here is the website I found. http://www.webdesigncrowd.com/scrolling-progress-bar/
    It looks like it has all the needed code, but it is different from the aquatilis site, but I don't know how to customize it to my needs.  Is there by chance a simpler implementation?  Any help is appreciated.
    Thanks

  • Large numbers while scrolling timeline

    Just recently started using Garageband 3 on a mac mini. We created a track and an itunes song was imported from the media browser. When scrolling through the track, a large display showing the time appeared in the middle of the screen. However, since that first time, the large numbers have disappeared. Does anyone know what setting toggles this on?

    I think the numbers only appear if you scroll quickly. If you drag the scroll bar slowly the numbers will not appear. Any chance this is the case for you? --HT

  • How can I create a vertical scroll for text in a 'div' in CSS Dreamweaver?

    Hi there,
    I need to flow a lot of text into a CSS div. However, I don't want a big long page as it will look ugly and be inconsistent with the other pages in the site.
    I need to be able to put in a vertical scroll directly in the div containing the text (not on the whole page) so the user can scroll the text down without moving down the whole page.
    Is there a way for me to do this?
    I'm a beginner to CSS so a step by step for dummies approach would be most helpful.
    Thanks in advance for any help!

    use the overflow:scroll property:
    http://www.w3schools.com/Css/pr_pos_overflow.asp

  • Scroll indicator sometimes disappears in Safari iOS 8.3 bug. (On scrollable divs using "-webkit-overflow-scrolling:touch")

    Hi,
    After updating to iOS 8.3 on an iPad Air, it seems something is wrong with the scroll indicator on scrollable divs in Safari.
    It scrolls like it should be, but randomly I just don't get to see the scroll indicator on the right side of the scrollable div.
    You can see the problem when refreshing the page, sometimes the scroll indicator is visible and sometimes it is not.
    Here is a small example, to view on an iPad/Safari: http://www.roidesrois.be/new_site/div_scroll.html
    The code used should be correct. Before the update I never saw this problem before.
    Here is an example from somebody else. http://www.quirksmode.org/css/css2/overflowscrolling.html
    I see the exact same problem there too.
    When using Chrome or Mercury on an iPad I don't see this problem, only in Safari.
    Can someone please confirm this problem or maybe has a solution for this?
    Is this a bug in Safari that needs to be solved?
    Thnx in advance,
    Kind regards.
    Lester.

    Hello to both of you.
    Don't know if this will clarify or mudle the issue but in the same platform context I have a similar issue. Don't know if you are familiar with the LaPresse App (go to AppStore and download it: it is free) but it has vertical text that begins mostly offscreen (just a small portion is visible), which you can swipe upwards and eventually beyond the top, without the tablet page height ever resizing at any moment. It behaves very similarly to an Adobe Premiere title starting off-screen at the bottom, then rolling upwards (e.g. as you would swipe, on the table), and ending off-screen over the top. That's what I'm trying to reproduce using Muse and cannot achieve. As soon as I move the text below the defined page size, Muse automatically expands that page size to accomodate the new text position. I thought of turning off vertical scrolling in the Page properties to force a static page height but the scrolling options in Tablet layout are disabled (by the way: why is that?)
    Gil

  • Rearrange clips in the timeline?

    I thought the purpose of the timeline at the bottom of the iMovie window was to be able to rearrange imported clips. When I option-click a clip to select the whole thing and then try to drag it to a different spot, I see a translucent filmstrip icon where I'm dragging, but when I relaease the mouse button, it pops back to where it was and nothing happens. (BTW, I'm in the timeline mode where it wraps the clips around from one row to the next, rather than showing one long scrolling timeline). How do I do this?

    As you drag the clip along the timeline over the other clips they should slide out of the way and you drop the clip when the gap appears where you want the clip to go.

Maybe you are looking for