W3C home > Mailing lists > Public > www-smil@w3.org > April to June 2002

Using SMIL for scrolling

From: Jason Foster <jafoster@uwaterloo.ca>
Date: Wed, 17 Apr 2002 22:06:30 -0400
To: www-smil@w3.org
Message-Id: <E62F2901-5270-11D6-8397-000A27E14D02@uwaterloo.ca>
I was hoping to use the SMIL animation facilities of SVG to implement a 
vertically scrollable area.  I've got my clipping region and my content 
working fine, and a pair of animations to scroll up and down.  These 
animations are started in the "onclick" handlers associated with two 
rectangles that are serving as buttons.

Of course I have just run into the "classic" problem where the end values 
of an animation disappear when the animation is restarted.  In other words 
I can scroll once upwards and/or once downwards.

I've looked on the mailing list and (briefly) on the web, and there don't 
seem to be any general solutions to this problem.  As near as I can tell, I'
ll be stuck using JavaScript to query the position at the end of the 
animation and to explicitly set the element position to that value.  
Hopefully the next time the animation starts it will notice the change.

This approach doesn't feel as elegant as I'd like, so any better 
suggestions would be gratefully appreciated.

Jason Foster
Received on Wednesday, 17 April 2002 22:07:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:53:27 GMT