I thought your code would be supposed to work, but accumulate="sum" 
seems to work with a repeatCount but not with multiple occurences of 
a begin value in both Batik 1.7 Squiggle and ASV3. And in Opera 
accumulate doesn't work at all.

The specification of the SMIL Animation Module seems not to be very 
specific about what a 'repeat' is in the context of cumulative 
animation. But implementors prefer to interpret it in the way that 
multiple occurences of the begin value will yield the same animation 
each time.

An interesing thing happens when you add repeatCount="2" to your code 
and run it in Squiggle. When you press the accessKey the rectangle 
will move a full of 50 pixels to the right. But when you press it 
repeatedly the animate starts before the last repeat of the last run 
of the animate, which is 25 pixels right from where it started 
before. So the rectangle moves 50 to the right. And each other time 
it will jump 25 to the left and move 50 to the right from there. But 
this is obviously a bug.

The only way I could think of how to do it is if the motion of the 
rectangle is restricted to a limited area and using access keys is 
not a necessety then you could use different <animate> elements for 
each interval of the area. Changing the pointer-events attributes of 
multiple stacked control elements with <set> elements would allow for 
simple navigation.

--- In [email protected], "Ludovic 
Levacher" <[EMAIL PROTECTED]> wrote:
>
> Hello,
> 
> I would like to move a rectangle of 25 pixels each time I press the
> 'r' key. I'm looking for a solution without scripting. Is it doable
> with SMIL?
> 
> Here is the code:
> <?xml version="1.0" encoding="UTF-8"?>
> <svg width="600" height="400" viewBox="-300 -200 600 400"
>       xmlns="http://www.w3.org/2000/svg";
>       xmlns:xlink="http://www.w3.org/1999/xlink";
>       xmlns:ev="http://www.w3.org/2001/xml-events";
>       xml:space="preserve" version="1.1" baseProfile="Normal">
> 
> <rect x="-25" y="-25" width="50" height="50" fill="#efece6"
> stroke="#ef4800">
>       <animate attributeName="x"
>               id="Animation_1_Segment" 
>               begin="accessKey(r)"
>               by="25" additive="sum" accumulate="sum"
>               dur="0.5s" fill="freeze"/>
> </rect>
> 
> </svg>
> 
> Any help would be greatly appreciated.
> 
> Thanks in advance,
> 
> Ludovic
>




-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to