Hi,
i'm working on a prototypical map application based on SVG (JSR226) and currently trying to figure out animations. i came across some questions / problems:
when i trigger the zoom animation from JavaME, it runs perfectly. If i trigger it the second time, it starts from the beginning again, not from the 1.2 value.Code:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> <svg version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="240" height="320" viewBox="0 0 240 289"> <g id="graphic"> <rect x="56.704" y="176.884" fill="#FFFFFF" stroke="#000000" width="18.622" height="33.563" id="staende2"/> <rect x="57.703" y="140.911" fill="#FFFFFF" stroke="#000000" width="18.622" height="33.563"/> </g> <defs> <animateTransform id="zoomIn" xlink:href="#graphic" attributeName="transform" type="scale" by="1.2" begin="indefinite" dur="0.2s" fill="freeze" additive="sum" accumulate="sum" /> </defs> </svg>
when i script the animation at the beginning of the Midlet, it has the same behavior.
when i script the animation in the keyEvent-Listener it runs as desired, but expands the DOM - it might make the Midlet crash after a long use. when i add a ID to the animatation and try to remove the old animation before creating a new one i get a "error.cannot.remove.node.with.id" exception (on Sun WTK)
i could animate the navigation using the setScale / setTransform methods, which is killing the separation of programming and layout...
any other ideas?

Reply With Quote

