Hi,

yes, as Chaals said, you were trying to use the SMIL (descriptive) version of 
setting 
attributes. This is perfectly fine, but you have to be aware that certain SVG 
viewers don't 
support SMIL, namely MozillaSVG/Firefox and Batik, though Batik is soon to 
support SMIL. 
The next planned release will support SMIL. Opera 9 and the Adobe viewers 
support SMIL.

If you want to use the scripted version (element.setAttributeNS()), have a look 
at our DOM 
tutorial: http://www.carto.net/papers/svg/manipulating_svg_with_dom_ecmascript/
index.shtml

Doug Schepers also wrote a SMIL javascript libraries, which can handle a lot of 
the simpler 
SMIL cases in javascript: http://www.vectoreal.com/smilscript/ - this is 
intended to be 
used in viewers that don't yet support SMIL, such as MozillaSVG.

Otherwise google for SMIL and SVG examples.

Andreas


--- In [email protected], "James C. Deering" <[EMAIL PROTECTED]> 
wrote:
>
> I am trying to rewrite an SVG presentation that I have using the authoring 
> guidelines 
that 
> Jonathan Watt posted at:
> 
> http://jwatt.org/svg/authoring/
> 
> Unfortunatly there is no working example of the setAttributeNS in action. Try 
> as I might 
I 
> can not figure out how to get the rough below snippet to not error (I'm more 
> on the 
visual 
> rather then coding side). Does anyone have a pointer to an example of the 
> correct way 
to 
> change the attributeName? If not, does anyone have a minute to give a quick 
> written 
> example. If I see it I can understand it.
> 
> Thanks;
> James Deering
> http://deerring.com
> 
> <svg width="100%" height="100%" viewBox="0 0 612 792"
> xmlns="http://www.w3.org/2000/svg";
> xmlns:xlink="http://www.w3.org/1999/xlink";
> >
> <defs>
> 
> <set xlink:href="#design1" attributeName="visibility" to="visible" 
> begin="logo.click"/>
> 
> </defs>
> 
> <rect id="layout" fill="#EAE3C6" x="0" y="0" width="612" height="792"> 
> </rect>
> 
> <g id="design1" visibility="hidden">
> 
> <rect id="button" fill="#EAE3C6" x="0" y="0" width="400" height="200"> 
> </rect>
> 
> </g>
> 
> <g id="logo">
> 
> <rect id="button" fill="#640000" x="0" y="0" width="400" height="200"> 
> </rect>
> 
> </g>
> 
> </svg>
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

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