xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J B <moa...@gmail.com>
Subject Re: ECMAScript animation doesnt work :-/
Date Thu, 12 Jan 2006 20:23:56 GMT
I am pretty sure Batik does not support animation.

Birch

On 1/12/06, socke <sockensoldat@web.de> wrote:
>
> HI friends,
>
> why does the following animation done with ecmascript doesnt work in the
> batik jsvgcanvas ;(
>
>
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
> <svg>
> <script type="text/ecmascript"><![CDATA[
>
> var counter = 0;
>     function clicked()
>     {
>          counter++;
>
>           var q2=document.getElementById("q2");
>        if(counter%2==0)
>           q2.setAttribute("fill", "red");
>       else
>           q2.setAttribute("fill", "black");
>
>       if(counter==10)
>               counter= 0;
>
>       setTimeout("clicked()",800);
>     }
>
> ]]>
> </script>
>
> <rect x="100" y="100" width="100" height="100" stroke="black"
> stroke-width="2px" fill="silver" onload=" clicked()"/>
> <text x="100" y="220" font-family="Verdana" font-size="10" fill="black">
>     Klick auf das obere Quadrat!
> </text>
>
> <rect id="q2" x="100" y="250" width="100" height="100" stroke="black"
> stroke-width="2px" fill="silver" />
> </svg>
>
>
>
>

Mime
View raw message