In IE/ASV, I am able to use animationObject.beginElement() and 
animationObject.endElement() to start and
stop a specific animation. It's more focused than pauseAnimations() and 
unpauseAnimations().

In order to invoke either, though, in IE, I have to first issue a command of 
the form
animationObject.setAttributeNS(null,"end", "undefined") -- since otherwise 
the endElement() is ignored.

Doing the same thing in Opera though results in a sudden crash of the 
browser(at least in Windows XP Pro SP/2). I've included a small example at 
the end of this to illustrate.

I would surmise this to be a bug in Opera (it ought not to just crash). 
However, if I remove the
 A.setAttribute("end","undefined")
then Opera doesn't crash, and the animation stops as desired. Incidentally, 
setting end="undefined" inside A's animate tag (which also works in IE) 
doesn't cause Opera to crash, but it also fails to stop the animation.

It would look to me as though IE's requiring the 
A.setAttribute("end","undefined"), before the A.endElement() can be 
understood is also a bug in IE, or is that as it should be expected.

I know some of you have played with beginElement and endElement, so perhaps 
you can see something I'm missing here.

David

-------------------------------------------------
<svg onload="startup(evt)" xmlns="http://www.w3.org/2000/svg";
xmlns:xlink="http://www.w3.org/1999/xlink";>
<script><![CDATA[
var svgDoc;
function startup(evt){
  svgDoc=evt.target.ownerDocument;
  SVGRoot = svgDoc.documentElement;
}

function Here(evt){
 A=svgDoc.getElementById("A")
 alert(A.getAttribute("dur"))
 A.setAttribute("end","undefined")
 A.endElement()
}
]]></script>

<ellipse id="E" cx="150" cy="75" rx="10" ry="40" fill="blue">
 <animate id="A" attributeName="rx" begin="G.click"
 onbegin="alert('started')" onend="alert('stopped')"
 dur="4s" values="10;110;10"  repeatCount="indefinite"/>
</ellipse>
<g id="G">
 <rect x="85" y="130" height="20" width="60" fill="green"/>
 <text x="90" y="148" font-size="20" fill="white">GO</text>
</g>
<g id="R" onclick="Here(evt)">
 <rect x="150" y="130" height="20" width="60" fill="red"/>
 <text x="155" y="148" font-size="20" fill="white">STOP</text>
</g>

</svg>




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

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