« ブログ・リアルタイム検索エンジン テクノラティ | メイン | 水俣川・天上沢(北鎌尾根へのアプローチ) »
2005年07月29日
麦わら帽子の夏
麦わら帽子は、「おんなのこそざい」さんよりお借りしました。
ひまわりは、「ざっきーのホームページ」さんよりお借りしました。
夏の風は、「季節素材◆夢幻華亭◆」さんよりお借りしました。
夏らしいコンテンツと云うことで、こんなのを作ってみました。
借り物ばっかりで、おまえは何もしてないじゃないかと怒られそうですが、
三つ(複数)の画像を合成するFlashプログラム、名付けて「イメージローダ」と
麦わら帽子を動かすために、三角関数を駆使した(?)次のようなアクション
スクリプトを作りました。
onClipEvent (load) {
this.kakudo = 45.0;
}
onClipEvent (enterFrame) {
this._x += 3;
if (this._x >= 500) {
this.kakudo = 35*Math.random() + 10;
this._x = -128;
}
this._y = 50 * Math.cos(this._x/this.kakudo) + 50;
this._alpha = 50 * Math.cos(this._x/(this.kakudo/2)) + 100;
this._rotation = 30 * Math.cos(this._x/(this.kakudo*2));
this._xscale = 10 * Math.cos(this._x/this.kakudo) + 90;
this._yscale = 10 * Math.cos(this._x/this.kakudo) + 90;
}
this.kakudo = 45.0;
}
onClipEvent (enterFrame) {
this._x += 3;
if (this._x >= 500) {
this.kakudo = 35*Math.random() + 10;
this._x = -128;
}
this._y = 50 * Math.cos(this._x/this.kakudo) + 50;
this._alpha = 50 * Math.cos(this._x/(this.kakudo/2)) + 100;
this._rotation = 30 * Math.cos(this._x/(this.kakudo*2));
this._xscale = 10 * Math.cos(this._x/this.kakudo) + 90;
this._yscale = 10 * Math.cos(this._x/this.kakudo) + 90;
}
投稿者 山旅人 : 2005年07月29日 05:55
トラックバック
このエントリーのトラックバックURL:
http://yama-tabi.net/cgi/mt/mt-tb.cgi/202

