メイン 迷える子羊の部屋【初心者専用】 「TypeError:Error #1009: nullのオブジェクト参照・・・・・」のエラー | 投稿するにはまず登録を |
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
ikeike | Åê¹ÆNo.50210 投稿日時: 2016-3-3 18:18 |
新米 居住地: 投稿: 23
使用環境:
win7, Flash CS6 |
「TypeError:Error #1009: nullのオブジェクト参照・・・・・」のエラー 質問させていただきます。
flash CS6、AS3で作成しています。ラベル名をfirst, second , thirdとし、 firstラベルフレームに、second, thirdの各ラベルに移動するボタンをつけました。 インスタンス名はそれぞれ secondBtn, thirdBtn としました。firstラベルにもどるボタンのインスタンス名をfirstBtnとしました。 各ラベルのボタンにもfirstBtn, secondBtn, thirdBtn等ボタンがあれば必要なインスタンスを設定しました。 質問です。 次のラベルにに進むときや後ろにもどる処理のときに以下のエラーがでるときがあります。thirdラベルからfirstラベルに戻るときなどは2つでるときもあります。 前回エラーになった場合でも、同じ操作でエラーがでないときもあります。 MethodInfo-の数字は1~たくさんでてきます。 「TypeError : Error #1009: nullのオブジェクト参照のプロパティまたはメソッドにアクセスすることはできません。 at MethodInfo-3()」 なにか解決策はありますか。よろしくおねがいいたします。 firstラベルにかいたスクリプトです。 this.stop(); //secondラベル、thirdラベルに進む処理 secondBtn.addEventListener(MouseEvent.CLICK, function() { secondBtn.removeEventListener(MouseEvent.ClLICK, arguments.callee) gotoAndStop("second"); }); thirdBtn.addEventListener(MouseEvent.CLICK, function() { thirdBtn.removeEventListener(MouseEvent.ClLICK, arguments.callee) gotoAndStop("third"); }); つぎにsecondラベルにかいたスクリプトです。 this.stop(); //次のラベルに進む処理 thirdBtn.addEventListener(MouseEvent.CLICK, function() { thirdBtn.removeEventListener(MouseEvent.ClLICK, arguments.callee) gotoAndStop("third"); }); //後ろのラベルにもどる処理 firstBtn.addEventListener(MouseEvent.CLICK, function() { firstBtn.removeEventListener(MouseEvent.ClLICK, arguments.callee) gotoAndStop("first"); }); //トップのラベルに戻る処理 firstBtn.addEventListener(MouseEvent.CLICK, function() { firstBtn.removeEventListener(MouseEvent.ClLICK, arguments.callee) gotoAndStop("first"); }); //thirdラベルは以下のとおりです。 this.stop(); //後ろのラベルにもどる処理 secondBtn.addEventListener(MouseEvent.CLICK, function() { secondBtn.removeEventListener(MouseEvent.ClLICK, arguments.callee) gotoAndStop("second"); }); //トップのラベルに戻る処理 firstBtn.addEventListener(MouseEvent.CLICK, function() { firstBtn.removeEventListener(MouseEvent.ClLICK, arguments.callee) gotoAndStop("first"); }); |
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | トップ |
投稿するにはまず登録を | |