フォーラム@nifty | フォーラム・サークル | サイトマップ | ヘルプ |
掲示板 コラム お役立ち イベント リンク   | FHPGサイトマップ | お問い合わせ |
TOP > お役立ち > JavaScriptのおもちゃ箱 > 回転する図形  

回転する図形(ダイレクトアニメーション)

原案:平井 公大 氏 (2001/02/04 登録)

 図形が立体的に回転します。IEのダイレクトアニメーション機能を使用しています(IE4.0)。

表示サンプル

ソース記述内容

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<title>回転する図形</title>
<script type="text/javascript">
<!--
function init() {
  figure.DrawSurface.fillcolor(figure.library.red);
  figure.DrawSurface.rect(10,-10,60,60);
  figure.DrawSurface.fillcolor(figure.library.blue);
  figure.DrawSurface.oval(-20,10,60,60);
  rotation();
}
function rotation() {
  figure.Rotate(10,0,4);
  setTimeout("rotation()",50);
}
// -->
</script>
</head>
<body>
<div style="height:180px">
  <object id="figure" style="position:absolute; top:360px; left:70px; width:600px; height:150px;" 
          classid="clsid:369303c2-d7ac-11d0-89d5-00a0c90833e6">
  </object>
  <script type="text/javascript">
<!--
init();
// -->
</script>
</div>
</body>
</html>
個人情報保護ポリシー
Copyright© NIFTY 2006 All Rights Reserved.
Copyright© FHPG 2006 All Rights Reserved.