授業メモ 6月12日
↓ActionScript↓
ガジェット内をクリックしてから、↑←↓←を押してください。
イベントハンドラで記述
onClipEvent(load){ var keyMove:Number = 25; } on(keyPress"<left>"){ this._x -= keyMove; } on(keyPress"<right>"){ this._x += keyMove; } on(keyPress"<up>"){ this._y -= keyMove; } on(keyPress"<down>"){ this._y += keyMove; }
ドラックしてください。
on(press){ this.startDrag(); } on(release, releaseOutside){ this.stopDrag(); }
ドラックの範囲指定
^^
http://d.hatena.ne.jp/web-actionscript/20120616/p1
↓JavaScript↓
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>演算練習</title> </head> <h3>1〜100まで足してダイアログボックスに合計を表示させるよ</h3> <button onclick="total()">計算結果</button> <script type="application/javascript"> function total(){ var ans = 0; for(i = 0; i <= 100; i++){ ans = ans + i; } alert("こたえは" + ans +"!!"); } //初期値「ans」を0にする //代入し続けている </script> <body> </body> </html>
ナビゲーション
<a href="#"><img src="../../img/1.jpg" width="160" height="60" alt="" onMouseOver="this.src='../../img/1_h.jpg'" onMouseOut="this.src='../../img/1_a.jpg'"></a>
Dreamweaverのビヘイビアーはソースが多くなるため、使わないほうがいい。