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

Trying to animate two lines moving each other

Expand Messages
  • Pranav Lal
    Hi all, I am trying to create a SVG animation which shows two verticle lines moving towards each other. How do I do this? See the below code. I suspect I am
    Message 1 of 16 , Dec 31 8:10 PM
      Hi all,

      I am trying to create a SVG animation which shows two verticle lines moving
      towards each other. How do I do this? See the below code. I suspect I am
      missing something obvious here.

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
      "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

      <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="8.5in"
      height="11.0in" pageHeight="11.0" pageWidth="8.5" source="SVGDraw by
      R.G.Baldwin" copyright="R.G.Baldwin,2011" id="svg1325384443840" viewBox="0.0
      0.0 850.0 1100.0">
      <title>test drawing</title>
      <desc>a drawing to test the audio tac display</desc>
      <line stroke="black" stroke-width="5.0" x1="20.0" y1="20.0" x2="20.0"
      y2="1100.0" id="line1325384491826" stroke-opacity="1.0">
      <title>leftLine</title>
      <desc>a line on the left of the screen</desc>
      <animate attributeName="x1" attributeType="XML" from="20.0" to="500"
      begin="0s" dur="10s" fill="freeze"
      </line>
      <line stroke="black" stroke-width="5.0" x1="1000.0" y1="20.0" x2="1000.0"
      y2="1100.0" id="line1325384524144" stroke-opacity="1.0">
      <title>rightLine</title>
      <desc>a line on the right</desc>
      <animate attributeName="x1" attributeType="XML" from="1000.0" to="500"
      begin="0s" dur="10s" fill="freeze"

      </line>
      </svg>
      Pranav
    • ozeroguz01
      well , try to find the errors like this encoding= UTF- 8 or test drawing ... the correct codes as follows ; encoding= UTF-8 or
      Message 2 of 16 , Jan 1, 2012
        well ,
        try to find the errors like this
        " encoding="UTF- 8" " or
        " <title>test drawing< /title> "...
        the correct codes as follows ;
        encoding="UTF-8" or
        " <title>test drawing< /title> "
        .
        .
        .
        and some tags unclosed ;
        <animate attributeName= "x1" attributeType= "XML" from="20.0" to="500"
        begin="0s" dur="10s" fill="freeze" --- this is your code ;
        the correct codes as follows
        <animate attributeName= "x1" attributeType= "XML" from="20.0" to="500"
        begin="0s" dur="10s" fill="freeze" />

        these are all correct codes ;

        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
        "http://www.w3.org/Graphics/ SVG/1.1/DTD/ svg11.dtd">

        <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="8.5in"
        height="11.0in" pageHeight=" 11.0" pageWidth="8. 5" source="SVGDraw by
        R.G.Baldwin" copyright="R. G.Baldwin, 2011" id="svg132538444384 0" viewBox="0.0
        0.0 850.0 1100.0">
        <title>test drawing</title>
        <desc>a drawing to test the audio tac display</desc>
        <line stroke="black" stroke-width= "5.0" x1="20.0" y1="20.0" x2="20.0"
        y2="1100.0" id="line13253844918 26" stroke-opacity= "1.0">
        <title>leftLine</title>
        <desc>a line on the left of the screen</desc>
        <animate attributeName= "x1" attributeType= "XML" from="20.0" to="500"
        begin="0s" dur="10s" fill="freeze"/>
        </line>
        <line stroke="black" stroke-width= "5.0" x1="1000.0" y1="20.0" x2="1000.0"
        y2="1100.0" id="line13253845241 44" stroke-opacity= "1.0">
        <title>rightLine</title>
        <desc>a line on the right</desc>
        <animate attributeName= "x1" attributeType= "XML" from="1000.0" to="500"
        begin="0s" dur="10s" fill="freeze" />

        </line>
        </svg>
      • Kenneth Nellis
        You didn t close your two tags resulting in parse errors. —Ken Nellis
        Message 3 of 16 , Jan 1, 2012
          You didn't close your two <animate> tags resulting in parse errors.
          —Ken Nellis
        • Pranav Lal
          Hi Kenneth, Thanks for that. Is there a desktop IDE available for parsing SVG or XML to detect such errors? Pranav ... From: svg-developers@yahoogroups.com
          Message 4 of 16 , Jan 1, 2012
            Hi Kenneth,

            Thanks for that. Is there a desktop IDE available for parsing SVG or XML to
            detect such errors?

            Pranav
            -----Original Message-----
            From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
            On Behalf Of Kenneth Nellis
            Sent: Monday, January 02, 2012 1:33 AM
            To: svg-developers@yahoogroups.com
            Subject: [svg-developers] Re: Trying to animate two lines moving each other

            You didn't close your two <animate> tags resulting in parse errors.
            -Ken Nellis

            ------------------------------------

            -----
            To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
            -or-
            visit http://groups.yahoo.com/group/svg-developers and click "edit my
            membership"
            ----Yahoo! Groups Links
          • Marty Sullivan
            Firefox/Opera/Chrome and probably other browsers will display all parse errors when you load the file. ... [Non-text portions of this message have been
            Message 5 of 16 , Jan 1, 2012
              Firefox/Opera/Chrome and probably other browsers will display all parse
              errors when you load the file.

              On Sun, Jan 1, 2012 at 7:05 PM, Pranav Lal <pranav.lal@...> wrote:

              > **
              >
              >
              > Hi Kenneth,
              >
              > Thanks for that. Is there a desktop IDE available for parsing SVG or XML to
              > detect such errors?
              >
              > Pranav
              >
              > -----Original Message-----
              > From: svg-developers@yahoogroups.com [mailto:
              > svg-developers@yahoogroups.com]
              > On Behalf Of Kenneth Nellis
              > Sent: Monday, January 02, 2012 1:33 AM
              > To: svg-developers@yahoogroups.com
              > Subject: [svg-developers] Re: Trying to animate two lines moving each other
              >
              > You didn't close your two <animate> tags resulting in parse errors.
              > -Ken Nellis
              >
              > ------------------------------------
              >
              > -----
              > To unsubscribe send a message to:
              > svg-developers-unsubscribe@yahoogroups.com
              > -or-
              > visit http://groups.yahoo.com/group/svg-developers and click "edit my
              > membership"
              > ----Yahoo! Groups Links
              >
              >
              >


              [Non-text portions of this message have been removed]
            • Ken Stacey
              Try closing the animate tags. Ken
              Message 6 of 16 , Jan 2, 2012
                Try closing the animate tags.

                Ken
              • Kenneth N
                Same with the one I used, Mac/Safari 5.1.2. †Ken
                Message 7 of 16 , Jan 2, 2012
                  Same with the one I used, Mac/Safari 5.1.2. â€"Ken

                  --- In svg-developers@yahoogroups.com, Marty Sullivan <dark3251@...> wrote:
                  >
                  > Firefox/Opera/Chrome and probably other browsers will display all parse
                  > errors when you load the file.
                  >
                  > On Sun, Jan 1, 2012 at 7:05 PM, Pranav Lal <pranav.lal@...> wrote:
                  >
                  > > **
                  > >
                  > >
                  > > Hi Kenneth,
                  > >
                  > > Thanks for that. Is there a desktop IDE available for parsing SVG or XML to
                  > > detect such errors?
                  > >
                  > > Pranav
                  > >
                  > > -----Original Message-----
                  > > From: svg-developers@yahoogroups.com [mailto:
                  > > svg-developers@yahoogroups.com]
                  > > On Behalf Of Kenneth Nellis
                  > > Sent: Monday, January 02, 2012 1:33 AM
                  > > To: svg-developers@yahoogroups.com
                  > > Subject: [svg-developers] Re: Trying to animate two lines moving each other
                  > >
                  > > You didn't close your two <animate> tags resulting in parse errors.
                  > > -Ken Nellis
                  > >
                  > > ------------------------------------
                  > >
                  > > -----
                  > > To unsubscribe send a message to:
                  > > svg-developers-unsubscribe@yahoogroups.com
                  > > -or-
                  > > visit http://groups.yahoo.com/group/svg-developers and click "edit my
                  > > membership"
                  > > ----Yahoo! Groups Links
                  > >
                  > >
                  > >
                  >
                  >
                  > [Non-text portions of this message have been removed]
                  >
                • Pranav Lal
                  Hmm, I ll have to check my Internet explorer (version 9) settings. It did not warn me about errors. Thanks everyone. Pranav
                  Message 8 of 16 , Jan 2, 2012
                    Hmm,

                    I'll have to check my Internet explorer (version 9) settings. It did not
                    warn me about errors.

                    Thanks everyone.
                    Pranav
                  • Robert Longson
                    Pranav, Since IE9 does not support SMIL animation of SVG, you d be better off using a browser that does if you re trying to see how it works. Most other
                    Message 9 of 16 , Jan 3, 2012
                      Pranav,

                      Since IE9 does not support SMIL animation of SVG, you'd be better off using a browser that does if you're trying to see how it works. Most other browsers do support SMIL animation of SVG - http://caniuse.com/#search=SVG%20SMIL.

                      Best regards

                      Robert.

                      --- In svg-developers@yahoogroups.com, "Pranav Lal" <pranav.lal@...> wrote:
                      >
                      > Hmm,
                      >
                      > I'll have to check my Internet explorer (version 9) settings. It did not
                      > warn me about errors.
                      >
                      > Thanks everyone.
                      > Pranav
                      >
                    • Pranav Lal
                      Hi Robert, Many thanks for this. I read about IE s SVG support and assumed that all features would be supported. I have Firefox installed so will go play with
                      Message 10 of 16 , Jan 3, 2012
                        Hi Robert,

                        Many thanks for this. I read about IE's SVG support and assumed that all
                        features would be supported. I have Firefox installed so will go play with
                        that.

                        Pranav
                      • David Dailey
                        While you are at it, it might not hurt to try things in both Opera and Firefox. Opera, overall is a bit further ahead than Firefox, I think, in their support
                        Message 11 of 16 , Jan 3, 2012
                          While you are at it, it might not hurt to try things in both Opera and
                          Firefox. Opera, overall is a bit further ahead than Firefox, I think, in
                          their support for SVG/SMIL, though both are ahead of Chrome and Safari. All
                          four, however, are making progress in their support of the spec.



                          Usually, these days, if code doesn't work in at least two of IE/ASV, Firefox
                          and Opera then it is likely to be a problem with the code. A couple of years
                          ago, it was just Opera and ASV (as well as., to be fair, Batik and Abbra)
                          that we had to test against the spec.



                          Cheers

                          David







                          From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
                          On Behalf Of Pranav Lal
                          Sent: Tuesday, January 03, 2012 6:20 PM
                          To: svg-developers@yahoogroups.com
                          Subject: RE: [svg-developers] Re: Trying to animate two lines moving each
                          other





                          Hi Robert,

                          Many thanks for this. I read about IE's SVG support and assumed that all
                          features would be supported. I have Firefox installed so will go play with
                          that.

                          Pranav





                          [Non-text portions of this message have been removed]
                        • yannick.bochatay@free.fr
                          Hi, I know it s not recommended to extend the prototype of hosted objects, but I d like to understand why Opera let us access the prototype of NodeList but
                          Message 12 of 16 , Jan 4, 2012
                            Hi,
                            I know it's not recommended to extend the prototype of hosted objects, but I'd like to understand why Opera let us access the prototype of NodeList but just ignore it :

                            NodeList.prototype.myExtendedMethod = function() {};
                            alert(document.querySelectorAll('a').myExtendedMethod); //undefined

                            This is not a SVG issue but I didn't found any resource on the web (except this one without any answer), and I know there are experts in opera browser in this mailing-list.
                            Thanks in advance for your help !
                            Cheers

                            Yannick Bochatay

                            [Non-text portions of this message have been removed]
                          • Cameron McCormack
                            ... I just tried this in Opera.next and it works for me.
                            Message 13 of 16 , Jan 4, 2012
                              yannick.bochatay@...:
                              > I know it's not recommended to extend the prototype of hosted objects,
                              > but I'd like to understand why Opera let us access the prototype of
                              > NodeList but just ignore it :
                              >
                              > NodeList.prototype.myExtendedMethod = function() {};
                              > alert(document.querySelectorAll('a').myExtendedMethod); //undefined
                              >
                              > This is not a SVG issue but I didn't found any resource on the web
                              > (except this one without any answer), and I know there are experts in
                              > opera browser in this mailing-list.

                              I just tried this in Opera.next and it works for me.
                            • yannick.bochatay@free.fr
                              I just downloaded opera 12 alpha and I get the same result. Here s the screenshot : Yannick ... De: Cameron McCormack À:
                              Message 14 of 16 , Jan 5, 2012
                                I just downloaded opera 12 alpha and I get the same result. Here's the screenshot :



                                Yannick

                                ----- Mail original -----

                                De: "Cameron McCormack" <cam@...>
                                À: svg-developers@yahoogroups.com
                                Cc: "yannick bochatay" <yannick.bochatay@...>
                                Envoyé: Mercredi 4 Janvier 2012 23:47:51
                                Objet: Re: [svg-developers] NodeList.prototype in opera






                                yannick.bochatay@... :


                                I know it's not recommended to extend the prototype of hosted objects,
                                but I'd like to understand why Opera let us access the prototype of
                                NodeList but just ignore it :

                                NodeList.prototype.myExtendedMethod = function() {};
                                alert(document.querySelectorAll('a').myExtendedMethod); //undefined

                                This is not a SVG issue but I didn't found any resource on the web
                                (except this one without any answer), and I know there are experts in
                                opera browser in this mailing-list.

                                I just tried this in Opera.next and it works for me.





                                [Non-text portions of this message have been removed]
                              • Erik Dahlstrom
                                ... That is a known issue. Currently tracked as bug CORE-26489. The selectors API methods in the spec used to return StaticNodeList objects. This was changed
                                Message 15 of 16 , Jan 5, 2012
                                  On Wed, 04 Jan 2012 11:18:34 +0100, <yannick.bochatay@...> wrote:

                                  > Hi,
                                  > I know it's not recommended to extend the prototype of hosted objects,
                                  > but I'd like to understand why Opera let us access the prototype of
                                  > NodeList but just ignore it :
                                  >
                                  > NodeList.prototype.myExtendedMethod = function() {};
                                  > alert(document.querySelectorAll('a').myExtendedMethod); //undefined
                                  >
                                  > This is not a SVG issue but I didn't found any resource on the web
                                  > (except this one without any answer), and I know there are experts in
                                  > opera browser in this mailing-list.
                                  > Thanks in advance for your help !
                                  > Cheers

                                  That is a known issue. Currently tracked as bug CORE-26489.

                                  The selectors API methods in the spec used to return "StaticNodeList"
                                  objects. This was changed later on to be "NodeList". That's part of the
                                  reason why.

                                  --
                                  Erik Dahlstrom, Core Technology Developer, Opera Software
                                  Co-Chair, W3C SVG Working Group
                                  Personal blog: http://my.opera.com/macdev_ed
                                • yannick.bochatay@free.fr
                                  Thanks Erik. It s surprising from Opera, usually so compliant. One more reason not to extend prototypes probably. Yannick. ... De: Erik Dahlstrom
                                  Message 16 of 16 , Jan 7, 2012
                                    Thanks Erik. It's surprising from Opera, usually so compliant.
                                    One more reason not to extend prototypes probably.
                                    Yannick.

                                    ----- Mail original -----
                                    De: "Erik Dahlstrom" <ed@...>
                                    À: svg-developers@yahoogroups.com
                                    Envoyé: Jeudi 5 Janvier 2012 15:03:28
                                    Objet: Re: [svg-developers] NodeList.prototype in opera






                                    On Wed, 04 Jan 2012 11:18:34 +0100, < yannick.bochatay@... > wrote:

                                    > Hi,
                                    > I know it's not recommended to extend the prototype of hosted objects,
                                    > but I'd like to understand why Opera let us access the prototype of
                                    > NodeList but just ignore it :
                                    >
                                    > NodeList.prototype.myExtendedMethod = function() {};
                                    > alert(document.querySelectorAll('a').myExtendedMethod); //undefined
                                    >
                                    > This is not a SVG issue but I didn't found any resource on the web
                                    > (except this one without any answer), and I know there are experts in
                                    > opera browser in this mailing-list.
                                    > Thanks in advance for your help !
                                    > Cheers

                                    That is a known issue. Currently tracked as bug CORE-26489.

                                    The selectors API methods in the spec used to return "StaticNodeList"
                                    objects. This was changed later on to be "NodeList". That's part of the
                                    reason why.

                                    --
                                    Erik Dahlstrom, Core Technology Developer, Opera Software
                                    Co-Chair, W3C SVG Working Group
                                    Personal blog: http://my.opera.com/macdev_ed
                                  Your message has been successfully submitted and would be delivered to recipients shortly.