reset animation

robz0mbie
03-21-2005, 05:01 PM
I'm trying to reset an animation so that on the click of a reset button it goes back to its start point, so that the play button can be clicked to start the animation again. Is there a reset function that can be used?

I'm currently trying to set the attributes of the animateTransform, and of the line (from within a function), so that it will start over, but I'm not managing to get them to reset. How can i set the x and y attributes of a line? and is there a way I can set the animateTransform to begin?

Thanks for the help!

tstokes
07-26-2005, 04:15 PM
Can you just refresh the parent document using javascript?

For example:

<g id='button'>
<rect x="250" y="320" width="50" height="20" style="stroke:black;fill:LightGray"/>
<text x="270" y="335" style="text-anchor:middle;font-size:12;font-family:Arial;fill:black">Reset</text>
<rect onclick="reset(evt)" x="250" y="320" width="50" height="20" style="stroke:none;fill-opacity:0"/>
</g>

function reset(evt)
{
window.location.reload();
}

Anonymous
07-27-2005, 03:56 AM
I'm currently trying to set the attributes of the animateTransform, and of the line (from within a function), so that it will start over, but I'm not managing to get them to reset. How can i set the x and y attributes of a line? and is there a way I can set the animateTransform to begin?


You can put in your animation tag, end="indefinite" and with script on reset click write
Your_anim.endElement()

line has not x and y attributes but x1 y1 x2 and y2 ....

To start animation, you can use
begin="Your_button.click"
or
use begin="indefinite" and by script make Your_anim.beginElement()

Michel

 
Web mp2kmag.com
mapforums.com

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum