ボタンを押すと、タイムライン上のサウンドが停止して再生されるようにしようとしています。また、そのタイムラインには、停止して再生するアニメーションもあります。作業に使用しているコードを取得できません。エラーが発生する
Del1、レイヤー「アクション」、フレーム 1、16 行目 1061: 未定義の可能性があるメソッドへの呼び出しが、静的なタイプの flash.media:SoundChannel の参照を介して再生されます。
Del1、レイヤー「アクション」、フレーム 1、行 10 1120: 未定義のプロパティ 花火へのアクセス。
私はこれが初めてで、エラーを修正してボタンを機能させる方法がわかりません。
ここにコード全体があります
import flash.events.MouseEvent;
import flash.media.Sound;
import flash.media.SoundChannel;
PlayButton.addEventListener(MouseEvent.CLICK, playbutton);
NextButton.addEventListener(MouseEvent.CLICK, nextbutton);
StopButton.addEventListener(MouseEvent.CLICK, stopbutton);
var mySound:Sound = new fireworks.wav();
var myChannel:SoundChannel = new SoundChannel();
myChannel = mySound.play();
function playbutton(event:MouseEvent):void
{
myChannel.play();
play();
}
function stopbutton(event:MouseEvent):void
{
stop();
myChannel.stop();
}
function nextbutton(event:MouseEvent):void
{
gotoAndPlay(1, "Del2");
}