I’ve received a few inquiries in recent weeks regarding parametric curves used as paths for a nonlinear scrolling UI element. Essentially, a sprite is constrained to be dragged along a curve representing an outline of some part of the UI. I’ve had to do this for more than one project, so some time ago I authored a TechNote on the process.
The TechNote starts with a simplistic timeline-based approach and then discusses some different approaches for handling the problem entirely in script. This allows the method to be expanded to UI elements that are dynamically created.
Recently, some of the projection computations were used in the Degrafa quadratic Bezier join method.
5 thoughts on “Curve-Constrained Scrolling in Actionscript”
You just reminded me of a time I did this back in Flash 4 or 5. Tweened a slider handle along a curved path and used gotoAndStop controlled by the mouse position. 🙂
Ah … those thrilling days of yesteryear. At my age, I’m surprised I can even remember what I did in Flash 4 or 5 🙂
A working sample would be nice to look at..
There is a link in the TechNote to download the files, although it’s a pretty old example, so it’s Flash/AS2.
This is cool – I have a comp-sci project coming up that I think I can use this on. I’m going to try and write it in Flex.
Comments are closed.