* clog_meister wrote:
>Problem: I want to continue an animationTransform from the y position
>it was 'frozen' to. The object is moved by 50 pixels along the y-axis
>(that works). After it stops I want it to go back 20 pixels along the
>y-axis from where it ended up (that doesn't work as expected).
>However, the effect is that the object is repainted at its original
>position and then goes back 20 pixels.

So use two animations like

  <svg xmlns='http://www.w3.org/2000/svg'>
    <rect width="100" height="100">
      <animateTransform
       attributeName='transform'
       type='translate'
       by='0,50'
       dur='2s'
       id='a'
       fill='freeze'
       />
      <animateTransform
       attributeName='transform'
       type='translate'
       by='0,-20'
       dur='2s'
       begin='a.end'
       fill='freeze'
       additive="sum"
       />
    </rect>
  </svg>

A certain broken implementation insists on the additive="sum" here,
perhaps that was your problem.

>I read a lot of material including the SVG standard and example code
>>from Opera and many, many others. I experimented with the 'additive'
>and 'accumulate' attributes. I also tinkered with prev.begin,
>prev.end, beginElement() and endElement(). All without success.

Note that prev.begin and prev.end are proprietary extensions that won't
work across implementations (unless you have an id="prev" somewhere).

>Can someone tell me how I can force animationTransform to retain the
>last 'freeze' position and animate from there? Or point me to a
>tutorial in which this behavior is explained? 
>
>In code I made something like this:
>(note: svgO is the animated object)
>
>  var animation;
>  
>  animation = svgO.ownerDocument.createElementNS(
>'http://www.w3.org/2000/svg', 'animateTransform' );

Note that dynamically creating animation elements, especially after
the document has begun, is highly problematic and does not work well
across implementations.

>  animation.setAttributeNS( null, 'by',  '0, -20' );
>  animation.setAttributeNS( null, 'dur', 3 );

Changing animation elements after they have begun and while they are
in the document tree is even more problematic. If at all possible you
should use them only directly as markup. If you have to use scripting
you should consider to script the animation instead of using SMIL.
-- 
Björn Höhrmann · mailto:[EMAIL PROTECTED] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 


-----
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