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

パスワード:


パスワード紛失

新規登録
メインメニュー
メイン
   コーダーズルーム【スクリプト系】
     releaseされたら、消去したい
投稿するにはまず登録を

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
naanbk
Åê¹ÆNo.2296
投稿日時: 2003-12-19 14:26
新米
居住地:
投稿: 2
使用環境:
releaseされたら、消去したい
はじめまして

Win XP
Flash MXの環境です。

メニュー枠が広がる展開型メニューで
マウスリリース時にサブメニューを非表示にしたいのです。
大元のボタンクラスをこのように定義して↓

ButtonClass = function(){}
obj = ButtonClass.prototype = new MovieClip();
obj.onLoad = function(){
this.init();
}
obj.init = function(){
this.func = true;
this.behave = "up";
}
obj.onRollOver = obj.onDragOver = function(){
if ( this.func ){
this.behave = "over";
this.gotoAndPlay("over");
this.overFunc();
}
}
obj.onRollOut = obj.onDragOut = obj.onReleaseOutside = function(){
if ( this.func ){
this.behave = "out";
this.gotoAndPlay("out");
this.outFunc();
}
}
obj.onPress = function(){
if ( this.func ){
this.behave = "press";
this.gotoAndPlay("press");
this.pressFunc();
}
}
obj.onRelease = function(){
if ( this.func ){
this.behave = "release";
this.gotoAndPlay("release");
this.releaseFunc();
}
}
obj.setFunc = function( b ){
this.func = b;
this.useHandCursor = b;
}

サブメニューではボタンクラスを継承して
SubmenubtnClass = function(){}
SubmenubtnClass.prototype = new ButtonClass();
SubmenubtnClass.prototype.releaseFunc = function(){
this._parent.submenu_mc.removeMovieClip();
for ( var pName in this._parent ){
if ( this != this._parent[pName] && this._parent[pName].id == this.id ){
this._parent[pName].endheight = this.closeheight;
if ( this._parent[pName].behave == "release" ){
this._parent[pName].setFunc( true );
this._parent[pName].onRelease();
}
}
}
this.setFunc( false );
this.endheight = this.openheight;
}

と、このようにやってみたのですけど上手くいきません。
どうか、ご教授ください、お願いします。
フラット表示 前のトピック | 次のトピック

題名 投稿者 日時
 » releaseされたら、消去したい naanbk 2003-12-19 14:26
     Re: releaseされたら、消去したい youich 2003-12-19 17:33
       Re: releaseされたら、消去したい naanbk 2003-12-22 14:01
         Re: releaseされたら、消去したい youich 2003-12-22 21:04

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