gh_urban schrieb:

> Thanks Holger,
>
> did the trick
>
> what i was trying to originally was after the <animate> element was
> added then to run the animation
>
> I was using 
>    a.setAttribute("begin", "indefinite");
>
> and then sending
>    document.getElementById('anim2').beginElement()
>
> but I'm guessing this beginElement() is sent too soon afte the
> appendChild so that it doesn't actualy function - it can begin
> something that doesn;'t yet exist!!!
>
> if I hold the begineElement() call back with setInterval it works as
> intened, but this is cludgy!!!
>
> Thanks again
>

oh in that case, you can just do this:
...
obj.appendChild(a);
a.beginElement();

 if that doesnt work, try

a.beginElementAt(0.1)

cheers
Holger

>
>
>
> --- In svg-developers@yahoogroups.com, Holger Will <[EMAIL PROTECTED]>
> wrote:
> > gh_urban schrieb:
> >
> > > tottaly bemused by this
> > >
> > > I have looked at the many answers already on this group,
> > >
> > > hacked my code to exactly as some of the final answers
> > >
> > > still no joy, anybody see what's wrong with it?
> > >
> > > here's the code:
> > >
> > >       function aniBtn(){
> > >       //create a reference for the object that wants animating
> > >       var obj = document.getElementById('bt1');
> > >                 
> > >       //create a new 'animate' element
> > >       var a = document.createElement("animate");
> > >                 
> > >       //now set the attributes
> > >       a.setAttribute("id","anim2");
> > >       a.setAttribute("begin", "indefinite");
> > >       a.setAttribute("attributeName","width");
> > >       a.setAttribute("from","0");
> > >       a.setAttribute("to","80");
> > >       a.setAttribute("dur","1s");
> > >                                   
> > >       // add the element to the
> > >       obj.appendChild(a);
> > >                 
>



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