Hi, I have a rect element in my svg Document.My SVG Document is below <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="300" height="300" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect x="20" y="20" width="250" height="250" style="fill:blue"> </rect> </svg> Now in javascript, I want to add a animate element dynamically to my rect element and my animate element will be like this. <animate attributeType="CSS" attributeName="opacity" from="1" to="0" dur="5s" repeatCount="indefinite" /> I tried to do this in my code var newAnimElement = m_SVGDocument.createElementNS("http://www.w3.org/2000/svg","animate"); newAnimElement.setAttributeNS("http://www.w3.org/1999/xlink","attributeType" ,"CSS"); newAnimElement.setAttributeNS("http://www.w3.org/1999/xlink","attributeName" ,"opacity"); newAnimElement.setAttributeNS("http://www.w3.org/1999/xlink","from","1"); newAnimElement.setAttributeNS("http://www.w3.org/1999/xlink","to","0"); newAnimElement.setAttributeNS("http://www.w3.org/1999/xlink","dur","5s"); newAnimElement.setAttributeNS("http://www.w3.org/1999/xlink","repeatCount"," indefinite"); newAnimElement.setAttributeNS("xlink:href",curElement); where curElement is the Rect Element. But this is not working. How do I do it. Regards Felix -----Original Message----- From: Doug Schepers [mailto:[EMAIL PROTECTED] Sent: 26 October 2004 03:15 To: [EMAIL PROTECTED] Subject: RE: [svg-developers] Audio on SVG Hi, Tony- Probably the best compromise would be to include both the proprietary and the standard (but not-quite-here) versions, and use a switch to select between the 2: <svg width='100%' height='100%' version='1.2' xmlns='http://www.w3.org/2000/svg' <http://www.w3.org/2000/svg'> xmlns:xlink='http://www.w3.org/1999/xlink' <http://www.w3.org/1999/xlink'> xmlns:asv3='http://www.adobe.com/svg10-extensions' <http://www.adobe.com/svg10-extensions'> asv3:timeline='independent'> <switch> <g requiredFeatures='http://www.w3.org/TR/SVG12/feature#Audio' <http://www.w3.org/TR/SVG12/feature#Audio'> > <audio xlink:href='sealab.mp3' volume='7' type='audio/mp3' begin='mybutton.mouseover' end='mybutton.mouseout' repeatCount='indefinite'/> </g> <g requiredExtensions='http://www.adobe.com/svg10-extensions' <http://www.adobe.com/svg10-extensions'> > <asv3:audio xlink:href='sealab.mp3' begin='mybutton.mouseover' end='mybutton.mouseout' repeatCount='indefinite' /> </g> </switch> <g id='mybutton'> <rect width='230' height='50' x='20' y='20' rx='10' style='fill:cornflowerblue; stroke:#000080; stroke-width:5'/> <text x='135' y='55' style='fill:#000080; text-anchor:middle; pointer-events:none; font-size:30;'> Where Are You? </text> </g> <rect x='0' y='0' width='270' height='90' style='fill:none; stroke:#777;'/> </svg> http://www.svg-whiz.com/audio/audioSwitch.svg <http://www.svg-whiz.com/audio/audioSwitch.svg> Regards- Doug Schepers doug . schepers @ vectoreal.com www.vectoreal.com Philippe Lhoste wrote: | | | techitoutuk wrote: | > How can you put audio clips on SVG? | > | > Tony Bell | | Theoritically, you have to wait for SVG 1.2, as Chris answered. | (Well, ASV6 may already implement this part.) | | Now, you can do it with ASV3 too, but it is a specific Adobe | extension, ie. it is not portable to other viewers. | | http://www.protocol7.com/svg-wiki/index.php/FullTextSearch?s=a%3Aaudio <http://www.protocol7.com/svg-wiki/index.php/FullTextSearch?s=a%3Aaudio> | | -- | Philippe Lhoste ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers <http://groups.yahoo.com/group/svg-developers> and click "edit my membership" ---- Yahoo! Groups Sponsor ADVERTISEMENT <http://us.ard.yahoo.com/SIG=129m1c4m4/M=315388.5526708.6599542.3001176/D=gr oups/S=1706030389:HM/EXP=1098832503/A=2372354/R=0/SIG=12id813k2/*https://www .orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS> click here <http://us.adserver.yahoo.com/l?M=315388.5526708.6599542.3001176/D=groups/S= :HM/A=2372354/rand=127159631> _____ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <http://groups.yahoo.com/group/svg-developers/> * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> $9.95 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/J8kdrA/y20IAA/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/

