私は非常に単純なスライドショーを作成しています.同じスクリプトでエラーなしで他のものを作成しました. これは、ショーのさまざまなポイントにジャンプするための 7 つのボタンが下部にあるシンプルなスライドショーです。
表示されているとおりに書かれたものをアクション ペインに入力すると、次のエラーが表示されます。
シーン 1、レイヤーのアクション、フレーム 1、ライン 1 1023: 互換性のないオーバーライド。シーン 1、レイヤーのアクション、フレーム 1、ライン 1 1023: 互換性のないオーバーライド。シーン 1、レイヤーのアクション、フレーム 1、ライン 1 1021: 関数定義が重複しています。MainTimeline、Line 1 1000: frame1 へのあいまいな参照。
スクリプトに何を入れても、これらのエラーが発生します。入力するのは基本的なコマンドだけで、次のようにコメントアウトされている場合でも: //stop;
これが私のスクリプトです:
import flash.events.MouseEvent;
button1.addEventListener(MouseEvent.CLICK,showpic1);
button2.addEventListener(MouseEvent.CLICK,showpic2);
button3.addEventListener(MouseEvent.CLICK,showpic3);
button4.addEventListener(MouseEvent.CLICK,showpic4);
button5.addEventListener(MouseEvent.CLICK,showpic5);
button6.addEventListener(MouseEvent.CLICK,showpic6);
button7.addEventListener(MouseEvent.CLICK,showpic7);
function showpic1(Event:MouseEvent):void{
gotoAndPlay("picture1");
}
function showpic2(Event:MouseEvent):void{
gotoAndPlay("picture2");
}
function showpic3(Event:MouseEvent):void{
gotoAndPlay("picture3");
}
function showpic4(Event:MouseEvent):void{
gotoAndPlay("piturec4");
}
function showpic5(Event:MouseEvent):void{
gotoAndPlay("picture5");
}
function showpic6(Event:MouseEvent):void{
gotoAndPlay("picture6");
}
function showpic7(Event:MouseEvent):void{
gotoAndPlay("picture7");
}