トップへ戻るニュースフォーラムFLASH-ML 過去ログBak@Flaダウンロードよくある質問と答
ログイン
ユーザ名:

パスワード:


パスワード紛失

新規登録
メインメニュー
メイン
   迷える子羊の部屋【初心者専用】
     無限スクロール
投稿するにはまず登録を

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
mayor
Åê¹ÆNo.22049
投稿日時: 2005-12-10 7:18
ちょんまげら
居住地: 東京砂漠
投稿: 4403
使用環境:
Re: 無限スクロール
サンプル2」のスクリプトを、一応載せておきます。

_root に配置したscreen フレームアクション
// サムネイル群とサムネイル群との間隔
spaceWidth = 50;
// スクロールするスピード
scrollSpeed = 0.2;
// 写真の枚数
photoMax = 120;
// サムネイル画像のサイズ
photoWidth = 100;
photoHeight = 80;

screenWidth = Stage.width;
thumbMax = 2;
baseWidth = photoWidth*photoMax;
baseHeight = photoHeight;
moveWidth = baseWidth + spaceWidth;

mousePos = 0;

for (var n=0; n<=thumbMax; n++) {
	scrollMenu.attachMovie("thumbs", "thumbs"+n, n);
	var thumbs_mc = scrollMenu["thumbs"+n];
	thumbs_mc._x = - baseWidth/2 + moveWidth*Math.floor(n/2-n*(n%2));
	thumbs_mc._y = - baseHeight/2;
	for (var t=1; t<=photoMax; t++) {
		var thumb_mc = scrollMenu["thumbs"+n].attachMovie("thumb"+t, "thumbs"+t, t);
		thumb_mc._x = photoWidth*t - baseWidth/2;
		thumb_mc.photoNum = t;
		thumb_mc.onRelease = function() {
			stopScrollMenu();
			showPhoto(this.photoNum);
		};
	}
}

closeBtnWidth = 60;
for (var n=1; n<=photoMax; n++) {
	var photo_mc = this.attachMovie("photo"+n, "photo"+n, n+1);
	photo_mc._visible = false;
	photo_mc._x = - photo_mc._width/2;
	photo_mc._y = - photo_mc._height/2;
	var close_btn = photo_mc.attachMovie("close_btn", "closeBtn", 1);
	close_btn._x = photo_mc._width - closeBtnWidth - 5;
	close_btn._y = 5;
	photo_mc.closeBtn.onRelease = function() {
		this._parent._visible = false;
		startScrollMenu();
	};
}

this.attachMovie("shadow", "shadow", 1);

(以下略)


ダウンロードできるようにしてあるflaファイルは、
そのまま流用しても混乱するだけだと思われますので、
必ず、attachMovie・リンケージを学習した上で、お使いください。


----------------
質問する際は、回答者に具体的な情報を与えてください。

フラット表示 前のトピック | 次のトピック

題名 投稿者 日時
   無限スクロール fukuda 2005-12-3 22:52
     Re: 無限スクロール mayor 2005-12-3 22:59
       Re: 無限スクロール fukuda 2005-12-3 23:02
         Re: 無限スクロール mayor 2005-12-3 23:11
           Re: 無限スクロール fukuda 2005-12-3 23:25
             Re: 無限スクロール mayor 2005-12-4 0:12
               Re: 無限スクロール fukuda 2005-12-4 0:24
                 Re: 無限スクロール mayor 2005-12-4 0:37
                   Re: 無限スクロール fukuda 2005-12-4 0:47
                     Re: 無限スクロール mayor 2005-12-4 4:22
                       Re: 無限スクロール fukuda 2005-12-5 0:31
                         Re: 無限スクロール mayor 2005-12-5 3:38
                           Re: 無限スクロール fukuda 2005-12-8 22:06
                             Re: 無限スクロール fukuda 2005-12-10 5:23
                             Re: 無限スクロール mayor 2005-12-10 5:27
                             » Re: 無限スクロール mayor 2005-12-10 7:18
                                 Re: 無限スクロール fukuda 2005-12-10 17:12
                                   Re: 無限スクロール mayor 2005-12-10 17:39

投稿するにはまず登録を
 
Copyright (C) 2003 FLASH-japan. All rights reserved.
Powered by Xoops