任何人都可以看到哪里不工作吗?
我正在尝试从导入的库中获取声音以在单击按钮时播放,
button_1.addEventListener(MouseEvent.CLICK, fl_ClickToPlayStopSound_2);
var fl_SC_2:SoundChannel;
var fl_ToPlay_2:Boolean = true;
function fl_ClickToPlayStopSound_2(evt:MouseEvent):void
{
if(fl_ToPlay_2)
{
var s:Sound = new Sound(new ("dog.mp3"));
fl_SC_2 = s.play();
}
else
{
fl_SC_2.stop();
}
fl_ToPlay_2 = !fl_ToPlay_2;
}
我收到此错误,
Scene 1, Layer 'Actions', Frame 1, Line 21 1120: Access of undefined property dog.