Copy link to clipboard
Copied
[Moderator moved from Using the Community (forums) to Animate.]
i put action script on a button "click to play/stop sound" but when I try it, it wont stop the audio when I click it and it shows an error please help!!
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at activity4_fla::MainTimeline/fl_ClickToPlayStopSound_12()
this is my code:
audioturnon.addEventListener(MouseEvent.CLICK, fl_ClickToPlayStopSound_12);
var fl_SC_12:SoundChannel;
//This variable keeps track of whether you want to play or stop the sound
var fl_ToPlay_12:Boolean = true;
function fl_ClickToPlayStopSound_12(evt:MouseEvent):void
{
if(fl_ToPlay_12)
{
var s:Sound = new Sound(new URLRequest("animalcrossingaudioClass.wav"));
fl_SC_12 = s.play();
}
else
{
fl_SC_12.stop();
}
fl_ToPlay_12 = !fl_ToPlay_12;
Copy link to clipboard
Copied
This is the Using the Community forum (which is the forum for issues using the forums).
Please tell us what Adobe application you are using so that this can be moved to the proper forum for help.
Copy link to clipboard
Copied
Action Script?? Gosh, I hope you're not using Flash.