r_v_putten schrieb:

> Hello group,
>
> It's a pain to just enlarge a complex object on mouseover with SMIL...
> I need an <animate> tag for x,y,width,height, plus the same again if I
> want to shrink it to it's former size on mouseout.


you could reduce the amount of animate tags, if you use animateTransform 
instead so its only two animations ,
translate and scale.

>
> If you have five identical objects, that's already 40 <animate> tags.
> So I tried to reuse the animation, but I wasn't too successful. On
> mouseover, all the objects enlarge and mouseout doesn't work at all.
> This might have to do with ASV3, which I'm using.
>
> Isn't there a more elegant way?


no, unfortunatly not. what you can do , if scripting is an option, is  
to create  the animate tags by script, so you dont have to type that 
much :-)
see for example:
http://www.treebuilder.de/svg/gaussianNumbers/blubber.svg

or you can create an xslt file that creates the animations for you, if 
scripting is not an option (you want it to run in Opera, or your mobile !).

this file was created with xslt:
http://www.treebuilder.de/svg/button2.svg

and here are some informations on how to do it
http://rr.latenightpc.com/wp/archives/2005/08/26/transforming-xml-to-an-svg-textpath/
http://www.treebuilder.de/svg/extentSVG/artikel/tut.html
http://www.treebuilder.de/svg/extentSVG/documentation.html

hth
Holger

>
> <?xml version="1.0" encoding="UTF-8"?>
> <svg>
>     <symbol id="oct" viewBox="-20 -20 60 60" >
>       <path style="stroke:black;fill:none;" d="M 39 1, 1 1, 39 39, 1 
> 39" />
>     </symbol>
>
>     <defs>
>       <use id="bla" xlink:href="#oct" x="110" y="100" width="140"
> height="140" style="fill: #699;" >
>           <animate attributeName="x" begin="bla.mouseover" dur="0.3s"
> from="110" to="70" fill="freeze" />
>           <animate attributeName="y" begin="bla.mouseover" dur="0.3s"
> from="100" to="60" fill="freeze" />
>           <animate attributeName="width" begin="bla.mouseover" dur="0.3s"
> from="140" to="220" fill="freeze" />
>           <animate attributeName="height" begin="bla.mouseover" dur="0.3s"
> from="140" to="220" fill="freeze" />
>
>           <animate attributeName="x" begin="bla.mouseout" dur="0.3s"
> to="110" from="70" fill="freeze" />
>           <animate attributeName="y" begin="bla.mouseout" dur="0.3s"
> to="100" from="60" fill="freeze" />
>           <animate attributeName="width" begin="bla.mouseout" dur="0.3s"
> to="140" from="220" fill="freeze" />
>           <animate attributeName="height" begin="bla.mouseout" dur="0.3s"
> to="140" from="220" fill="freeze" />
>       </use>
>     </defs>
>     <use xlink:href="#bla" x="100" />
>     <use xlink:href="#bla" x="200" />
>     <use xlink:href="#bla" x="300" />
>     <use xlink:href="#bla" x="400" />
>     <use xlink:href="#bla" x="500" />
> </svg>
>
>
>
> ------------------------------------------------------------------------
>


-- 
if this information was usefull, please try to help someone else !
http://www.treebuilder.de



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/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