I am trying to create a basic timeline, similar to the timeline we all use in flash (see attached).
I have a playhead slider, which when dragged, just drags within its startDrag() limits.
I also have horizontal window scroller which also when dragged, just drags within its startDrag() limits.
I am trying to work out how to get the horizontal window scroller to scroll when the playhead slider hits the left or right edge. I am using hittest for this collision.
I have the playHeadSlider scrolling along the top. When playHeadSlider collides with hittestThing I want mcContents to then move.
It kind of works… mcContents moves when the playHeadSlider is in collision with the hittestThing… but it just moves rather than ‘drags’ across. I have it set up so that mcContents is twice the width (approx) of mcScrollWindow.
I need to somehow update the mcContents limits so that if the playHeadSlider collides with hittestThing on the right, mcContents only moves to the right and if playHeadSlider collides with hittestThing2 on the left, mcContents only moves to the left…