DUNG SVG VẼ RỒI VIẾT BA PROGAMS TRONG CÙNG MỘT SVG NHƯ SAU.
Copy trang nẩy rồi post vào Notepad. Dùng Google mở xem.
----------------------------------
xmlns="http://www.w3.org/1999/xhtml">
<svg xmlns="http://www.w3.org/2000/svg"
width="5000"
height="3000">
// vẽ
radar trước tiên và cho chuyển đông.
<g id="radar"
transform="translate(175,150)">
<ellipse cx="0"
cy="0" rx="40" ry="35" stroke="red"
fill="yellow">
<animateTransform attributeName="transform"
type="rotate"
dur="1"
from="0" to ="360" repeatCount="indefinite"/>
</ellipse>
// vẽ cần phát sóng và cho họat động.
<line x1="0"
y1="0" x2="150" y2="0" stroke="red"
stroke-width="2">
<animateTransform attributeName="transform"
type="rotate"
dur="2"
from="0" to ="360" begin="B.click"
end="S.click" repeatCount="indefinite"/>
</line>
//chọn vị trí của nút START VÀ STOP
<g id="B">
<text x="-40"
y="10" font-size="20">START</g>
<g id="S">
<text x="35"
y="15" font-size="20">STOP</g>
</g>
//vẽ phi đạn của địch màu xanh và cho chuyển
động.
<g id="bullet"
transform="translate(250,150)">
<circle cx="0"
cy="30" r="15" stroke="green"
fill="blue">
<animate
attributeName="cx" dur="2" from="290" to
="20" repeatCount="indefinite"/>
</circle></g>
//vẽ phi đạn từ dưới cho phóng lên chận địch
<circle cx="245"
cy="100" r="25" stroke="blue"
fill="red">
<animateMotion
dur="1" from ="160,100" to ="50,-80"
repeatCount
="indefinite"/>
</crcle></g>
</svg>