Hi all,

I'm doing something similar to the example below and using the onend attribute 
to call a function in an animate element.  This works in IE with ASV, Firefox 
and Opera, but fails to fire the event when running in webkit browsers (Chrome 
and Safari).  Anyway to make something like this work in these browsers?

Thanks,
Donna

--- In [email protected], Cameron McCormack <cam@...> wrote:
>
> Hi David.
> 
> ddailey:
> > Does someone know if one can trigger a JavaScript function when a SMIL
> > animation terminates? Basically, I'd like a moving object to remove
> > itself from the SVG DOM when its animation completes.
> >
> > I thought I had done this once but if I did it is now forgotten.
> 
> Yes you can do this by attaching an event handler to the SMIL endEvent
> event.  Try:
> 
>   <svg xmlns="http://www.w3.org/2000/svg";>
>     <circle cx="100" cy="100" r="100">
>       <animate attributeName="r" to="50" begin="2s" dur="3s"
>                onend="c = evt.target.parentNode;
>                       c.parentNode.removeChild(c)"/>
>     </circle>
>   </svg>
> 
> Cameron
> 
> -- 
> Cameron McCormack, http://mcc.id.au/
>       xmpp:heycam@...  ▪  ICQ 26955922  ▪  MSN cam@...
>




------------------------------------

-----
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:
    [email protected] 
    [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