Hi David,

Can I create the animations at startup and modify them later?
Can you direct me where to hack FakeSmile to add support for dynamic animations?

Thanks



________________________________
 From: David Leunen <leune...@gmail.com>
To: svg-developers@yahoogroups.com 
Sent: Friday, July 20, 2012 2:54 PM
Subject: Re: [svg-developers] fakesmile - dynamically creating animate element
 

  
Hi Pablo,

You are not doing anything wrong.
FakeSmile just doesn't work with animations that are created after it's run.

If you create all your dynamic animations at startup, you can call
FakeSmile after the creations. But if you're creating the animations in
events, feel free to hack FakeSmile :-)

David

On Fri, Jul 13, 2012 at 5:49 AM, pablo.platt <pablo.pl...@yahoo.com> wrote:

> Hi,
>
> I'm using FakeSmile to enable animations in IE9.
> I'm able to use the animate element when it is initially part of the svg
> document but when I'm adding an animate element dynamically I'm getting an
> error on IE9:
> Object doesn't support property or method 'beginElement'
>
> Static works:
> http://jsfiddle.net/6gZWn/1/
>
> Dynamic doesn't work:
> http://jsfiddle.net/DgMDV/13/
>
> What am I doing wrong?
>
> Thanks
>
>
> Code:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE HTML><html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en">
> <head>
> </head>
> <body>
> <meta http-equiv="content-type" content="application/xhtml+xml;
> charset=utf-8" /><svg
>    xmlns:svg="http://www.w3.org/2000/svg";
>    xmlns="http://www.w3.org/2000/svg";
>    xmlns:xlink="http://www.w3.org/1999/xlink";
>    version="1.0"
>    viewBox="0 0 120 40"
>     xml:space="preserve">
> <script type="text/ecmascript" xlink:href="
> http://leunen.me/fakesmile/smil.user.js"; />
>    <rect  x="10" y="10" width="10" height="10" fill="#c66" />
> </svg>
>
> <sctipt type="text/javascript">
> var svg   = document.getElementsByTagName('svg')[0];
> var rect = document.getElementsByTagName('rect')[0];
>
> var animation = document.createElementNS(
>     "http://www.w3.org/2000/svg";, "animate");
> animation.setAttributeNS(null, 'attributeName', 'x');
> animation.setAttributeNS(null, 'dur', 0.5);
> animation.setAttributeNS(null, 'begin', 'indefinite');
> animation.setAttributeNS(null, 'fill', 'freeze');
> animation.setAttributeNS(null, 'to', 100);
> rect.appendChild(animation);
> animation.beginElement();
> </script>
> </body>
> </html>
>
>
>

[Non-text portions of this message have been removed]


 

[Non-text portions of this message have been removed]



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

-----
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-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:
    svg-developers-dig...@yahoogroups.com 
    svg-developers-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    svg-developers-unsubscr...@yahoogroups.com

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

Reply via email to