新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   >>中国XML论坛<<     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论SVG, GML, X3D, VRML, VML, XAML, AVALON, Batik等基于XML的图形技术,以及有关GIS的应用。
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - 高级XML应用『 SVG/GML/VRML/X3D/XAML 』 → 这个,动画和事件,怎么没反应。。。。。 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 6158 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: 这个,动画和事件,怎么没反应。。。。。 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     定风波 帅哥哟,离线,有人找我吗?天秤座1987-10-23
      
      
      等级:大一(高数修炼中)
      文章:14
      积分:123
      门派:W3CHINA.ORG
      注册:2008/4/5

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给定风波发送一个短消息 把定风波加入好友 查看定风波的个人资料 搜索定风波在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 点击这里发送电邮给定风波 引用回复这个贴子 回复这个贴子 查看定风波的博客楼主
    发贴心情 这个,动画和事件,怎么没反应。。。。。

    是浏览器解译不出来\r\n还是程序有误\r\n???\r\n\r\n还是后缀名的错误\r\n\r\n是 xml   html  svg  还是xhtml


    <?xml version="1.0"?>
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      <head>
     
     <script>
       <![CDATA[
       function init()
       {
         var ellipse = document.getElementById('ellip1');
         ellipse.addEventListener("click", mouseclick_listener, false);
                     boy= document.getElementById(boy');
       }     

       function mouseclick_listener(evt)
       {
         alert("Welcome to swjtu !\n");
       }

       ]]>
     </script>
      </head>
      <body onload="init();">

     <svg:svg width="1024" height="768">
       <svg:g id="ellip1">
      <svg:ellipse id="ellip1"  cx="562" cy="374" rx="50" ry="25"  style="fill: red;"/>
       </svg:g>
     
    <!--wall of the campus-->
    <svg:line x1="62" y1="84" x2="462" y2="84"
            stroke-width="3" stroke="blue"/>
    <svg:line x1="562" y1="84" x2="962" y2="84"
            stroke-width="3" stroke="blue"/>
    <svg:line x1="962" y1="84" x2="962" y2="334"
            stroke-width="3" stroke="blue"/>
    <svg:line x1="962" y1="434" x2="962" y2="684"
            stroke-width="3" stroke="blue"/>
    <svg:line x1="962" y1="684" x2="262" y2="684"
            stroke-width="3" stroke="blue"/>
    <svg:line x1="162" y1="684" x2="62" y2="684"
            stroke-width="3" stroke="blue"/>
    <svg:line x1="62" y1="684" x2="62" y2="384"
            stroke-width="3" stroke="blue"/>
    <svg:line x1="62" y1="284" x2="62" y2="84"
            stroke-width="3" stroke="blue"/>

    <!--pe court-->
    <svg:rect x="862" y="484" width="100" height="200" rx="30" ry="20"
        fill="red" stroke="blue" stroke-width="2" />

    <!--south gate path-->
    <svg:line x1="962" y1="334" x2="762" y2="334"
            stroke-width="2" stroke="brown"/>
    <svg:line x1="962" y1="434" x2="762" y2="434"
            stroke-width="2" stroke="brown"/>
    <svg:line x1="762" y1="334" x2="762" y2="234"
            stroke-width="2" stroke="brown"/>
    <svg:line x1="762" y1="434" x2="762" y2="584"
            stroke-width="2" stroke="brown"/>

    <!--east gate path-->
    <svg:line x1="562" y1="84" x2="562" y2="234"
            stroke-width="2" stroke="brown"/>
    <svg:line x1="562" y1="234" x2="762" y2="234"
            stroke-width="2" stroke="brown"/>
    <svg:line x1="462" y1="84" x2="462" y2="234"
            stroke-width="2" stroke="brown"/>
    <svg:line x1="462" y1="234" x2="162" y2="234"
            stroke-width="2" stroke="brown"/>

    <!--north gate path-->
    <svg:line x1="62" y1="284" x2="162" y2="284"
            stroke-width="2" stroke="brown"/>
    <svg:line x1="162" y1="284" x2="162" y2="234"
            stroke-width="2" stroke="brown"/>
    <svg:line x1="62" y1="384" x2="162" y2="384"
            stroke-width="2" stroke="brown"/>
    <svg:line x1="162" y1="384" x2="162" y2="684"
            stroke-width="2" stroke="brown"/>

    <!--west gate path-->
    <svg:line x1="262" y1="684" x2="262" y2="584"
            stroke-width="2" stroke="brown"/>
    <svg:line x1="762" y1="584" x2="262" y2="584"
            stroke-width="2" stroke="brown"/>

    <!--teaching building-->
    <svg:rect x="362" y="264" width="280" height="50"
            fill="none" stroke="black" stroke-width="2" />
    <svg:text x="380" y="298" font-size="20"
            stroke="blue">teaching building 5  6  7</svg:text>
    <svg:rect x="412" y="434" width="230" height="50"
            fill="none" stroke="black" stroke-width="2" />
    <svg:text x="430" y="466" font-size="20"
            stroke="blue">teaching building 1  2</svg:text>

    <!--library-->
    <svg:rect x="332" y="380" width="50" height="100"
            fill="none" stroke="black" stroke-width="2" />
    <svg:text x="336" y="430" font-size="12"
            stroke="blue">library</svg:text>

    <!--dormitory-->
    <svg:rect x="450" y="520" width="200" height="50"
            fill="none" stroke="black" stroke-width="2" />
    <svg:text x="498" y="553" font-size="20"
            stroke="blue">dormitory</svg:text>

    <!--welcome to swjtu !-->
    <svg:text x="712" y="380" font-size="25"
           font-family="Monotype Corsiva"
           fill="orange" stroke="red">Welcome to swjtu !</svg:text>

    <!--click here-->
    <svg:text x="525" y="378" font-size="15"
       stroke="green">click here</svg:text>

    <!--go to dining hall-->
    <svg:rect x="330" y="544" width="60" height="30"
            fill="none" stroke="green" stroke-width="2" />
    <svg:text x="333" y="560" font-size="10"
       stroke="blue">dining hall</svg:text>

    <!-- Visible path -->
      <svg:desc>Markers</svg:desc>
      <svg:defs>
        <svg:marker id="arrow"
          viewBox="0 0 10 10" refX="0" refY="5"
          markerUnits="strokeWidth" markerWidth="5" markerHeight="15"
          orient="auto">
          <svg:path d="M 0 0 L 10 5 L 0 10 z" fill="yellow" stroke="black"/>
        </svg:marker>
      </svg:defs>
    <svg:path d="M 960 390 L 730 390 L 730 500 L 362 500 L 362 544"
            fill="none" stroke="violet" stroke-width="2"  
            marker-start="url(#arrow)"
            marker-mid="url(#arrow)"
            marker-end="url(#arrow)" />
    <svg:path d="M 960 390 L 730 390 L 730 500 L 362 500 L 362 544"
            fill="none" stroke="violet" stroke-width="2"  />

    <!-- Group of elements to animate -->
    <svg:g  stroke-width="5" stroke="black" id="boy" >

    <!-- Stick figure pieces -->
        <svg:circle cx="962" cy="374" r="10" fill="black"/>
        <svg:line x1="962" y1="384" x2="947" y2="394"/>
        <svg:line x1="962" y1="384" x2="977" y2="394"/>
        <svg:line x1="957" y1="389" x2="957" y2="404"/>
        <svg:line x1="967" y1="389" x2="967" y2="404"/> 
        <!-- Animation controls --> 
        <svg:animateMotion path="M 960 390 L 750 390 L 750 500 L 362 500 L 362 544"
               dur="10s" repeatCount="indefinite"
               rotate="auto" />
    </svg:g>
    </svg:svg>

      </body>
    </html>


       收藏   分享  
    顶(0)
      




    ----------------------------------------------
    交流才能进步!

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2008/4/8 14:56:00
     
     zoulixing 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:6
      积分:75
      门派:XML.ORG.CN
      注册:2008/4/7

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给zoulixing发送一个短消息 把zoulixing加入好友 查看zoulixing的个人资料 搜索zoulixing在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看zoulixing的博客2
    发贴心情 
    让我来看看
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2008/4/11 9:53:00
     
     zoulixing 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:6
      积分:75
      门派:XML.ORG.CN
      注册:2008/4/7

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给zoulixing发送一个短消息 把zoulixing加入好友 查看zoulixing的个人资料 搜索zoulixing在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看zoulixing的博客3
    发贴心情 
    你的程序怎么标签格式都写的不对
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2008/4/11 9:59:00
     
     定风波 帅哥哟,离线,有人找我吗?天秤座1987-10-23
      
      
      等级:大一(高数修炼中)
      文章:14
      积分:123
      门派:W3CHINA.ORG
      注册:2008/4/5

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给定风波发送一个短消息 把定风波加入好友 查看定风波的个人资料 搜索定风波在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 点击这里发送电邮给定风波 引用回复这个贴子 回复这个贴子 查看定风波的博客4
    发贴心情 
    可否详细说明一下

    小弟刚学啊

    ----------------------------------------------
    交流才能进步!

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2008/4/12 14:09:00
     
     GoogleAdSense天秤座1987-10-23
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 点击这里发送电邮给Google AdSense 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/4/28 2:10:48

    本主题贴数4,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    110.352ms