Loading ...
Sorry, an error occurred while loading the content.

Re: [svg-developers] SMIL animateColor question

Expand Messages
  • Charles McCathieNevile
    On Thu, 01 Jan 2009 12:53:41 +1100, Kenneth Nellis ... You have two animations. The first one goes white to black over 5 seconds, and
    Message 1 of 3 , Dec 31, 2008
    • 0 Attachment
      On Thu, 01 Jan 2009 12:53:41 +1100, Kenneth Nellis <nellisks@...>
      wrote:

      > I have a SMIL animation that I'm having trouble making do what I
      > want, if it is even possible. I've reduced the problem to the SVG at
      > the following URL where a square changes color from white to black
      > and back to white. I want it to keep changing back and forth.
      >
      > homepage.mac.com/nellisks/yahoo/groups/svg-developers/smil.svg

      You have two animations. The first one goes white to black over 5 seconds,
      and repeats. This means you get white...greying...black and then jump back
      to white and start again.

      The second one only runs once, going from black to white.

      If, instead of from and to, you have values="white;black;white" in the
      first one (and drop the second) it should work. A simplified version of
      your testcase with the changes:

      <?xml version="1.0" encoding="UTF-8" ?>
      <svg xmlns="http://www.w3.org/2000/svg">
      <rect x="100" y="100" width="200" height="200" >
      <animateColor attributeName="fill" attributeType="XML"
      values="white;black;white"
      begin="0s" dur="5s" repeatCount="indefinite" />
      </rect>
      </svg>

      (I tested it with the use and everything you originally had and it also
      works).

      cheers

      Chaals

      --
      Charles McCathieNevile Opera Software, Standards Group
      je parle français -- hablo español -- jeg lærer norsk
      http://my.opera.com/chaals Try Opera: http://www.opera.com
    • Kenneth Nellis
      Thanx, Chaals, works great! I wasn t aware of the values attribute. I need a more usable online reference.
      Message 2 of 3 , Jan 1, 2009
      • 0 Attachment
        Thanx, Chaals, works great! I wasn't aware of the "values" attribute.
        I need a more usable online reference.
        http://www.w3.org/TR/2003/REC-SVG11-20030114/eltindex.html
        Happy new year!
        �Ken

        > Re: SMIL animateColor question
        > Posted by: "Charles McCathieNevile" chaals@... charlesmccn
        > Wed Dec 31, 2008 6:16 pm (PST)
        >
        > On Thu, 01 Jan 2009 12:53:41 +1100, Kenneth Nellis
        > <nellisks@...>
        > wrote:
        >
        > > I have a SMIL animation that I'm having trouble making do what I
        > > want, if it is even possible. I've reduced the problem to the SVG at
        > > the following URL where a square changes color from white to black
        > > and back to white. I want it to keep changing back and forth.
        > >
        > > homepage.mac.com/nellisks/yahoo/groups/svg-developers/smil.svg
        >
        > You have two animations. The first one goes white to black over 5
        > seconds,
        > and repeats. This means you get white...greying...black and then
        > jump back
        > to white and start again.
        >
        > The second one only runs once, going from black to white.
        >
        > If, instead of from and to, you have values="white;black;white" in the
        > first one (and drop the second) it should work. A simplified
        > version of
        > your testcase with the changes:
        >
        > <?xml version="1.0" encoding="UTF-8" ?>
        > <svg xmlns="http://www.w3.org/2000/svg">
        > <rect x="100" y="100" width="200" height="200" >
        > <animateColor attributeName="fill" attributeType="XML"
        > values="white;black;white"
        > begin="0s" dur="5s" repeatCount="indefinite" />
        > </rect>
        > </svg>
        >
        > (I tested it with the use and everything you originally had and it
        > also
        > works).
        >
        > cheers
        >
        > Chaals
        >
        > --
        > Charles McCathieNevile Opera Software, Standards Group
        > je parle fran�ais -- hablo espa�ol -- jeg l�rer norsk
        > http://my.opera.com/chaals Try Opera: http://www.opera.com




        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.