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

パスワード:


パスワード紛失

新規登録
メインメニュー
メイン
   コーダーズルーム【スクリプト系】
     createTextField+RollOver(OUT)について
投稿するにはまず登録を

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
pinkgear
Åê¹ÆNo.10942
投稿日時: 2004-9-19 4:36
半人前
居住地:
投稿: 35
使用環境:
Re: createTextField+RollOver(OUT)について
ども。
setIntervalでマウスカーソルの位置をチェックしてみてはどうでしょうか?
以下のコードは簡単に書いただけですので、あまりよくありませんが。(^^;

theName = "text1";
function MyFunc (arg) {
trace ("クリックされました! 引数は"+arg);
}

this.createTextField(theName,-100,14,-10,100,20);
this[theName].html= true;
this[theName].htmlText="<A HREF='asfunction:MyFunc,Foo'>Click Me!</A>";

/*
this.onRollOver = function(){
this[theName]._x =20;
}

this.onRollOut = function(){
this[theName]._x =14; 
}
*/

var intervalID = setInterval( ProxyCheckMouseArea, 10, this );

function ProxyCheckMouseArea( aParentMC )
{
	aParentMC.CheckMouseArea();
}

function CheckMouseArea()
{
	var xmin, xmax;
	var ymin, xmax;
	
	xmin = this[theName]._x;
	ymin = this[theName]._y;
	
	xmax = this[theName]._x + this[theName]._width;
	ymax = this[theName]._y + this[theName]._height;
	
	if( this._xmouse >= xmin && this._xmouse <= xmax &&
		this._ymouse >= ymin && this._ymouse <= ymax )
	{
		this[theName]._x =20;
	}
	else
	{
		this[theName]._x =14; 
	}
}
フラット表示 前のトピック | 次のトピック

題名 投稿者 日時
   createTextField+RollOver(OUT)について wm106p 2004-9-19 0:00
   » Re: createTextField+RollOver(OUT)について pinkgear 2004-9-19 4:36
       Re: createTextField+RollOver(OUT)について wm106p 2004-9-20 22:31
     Re: createTextField+RollOver(OUT)について Fumio 2004-9-19 4:49
       Re: createTextField+RollOver(OUT)について wm106p 2004-9-20 22:33

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