Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Error #2044: Unhandled IOErrorEvent:. text=Error

New Here ,
Jul 02, 2022 Jul 02, 2022

hello guys, may u help me to tell me whats wrong with this code ?
before i test my project its ok (i using adobe animate 2021), but then when i try open in adobe anime 2022 (for testing other error but not work) so i return using adobe animate 2021. then i try my project then this error out.
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error. at multimediainteraktifpurapusertasik_fla::musik_on_2/frame1()[multimediainteraktifpurapusertasik_fla.musik_on_2::frame1:15]

my code:

import flash.events.MouseEvent;
import flash.media.SoundTransform;
stop();

 

tombol_matikan_musik.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);

function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
{
gotoAndStop(2);
}


var lagu:Sound = new Sound();
lagu.load(new URLRequest("Backsound.mp3"));
var musik:SoundChannel = new SoundChannel();
musik = lagu.play(0,1);

 

tombol_matikan_musik.addEventListener(MouseEvent.CLICK, atur_tombol_suara);


var suara_aktif:Boolean = true;
var posisi:Number = 0;

function atur_tombol_suara(e:MouseEvent):void
{
var nama_tombol:String = e.currentTarget.name;
nama_tombol == "tombol_matikan_musik";
{
posisi = musik.position;
musik.stop();
suara_aktif = false;
}

}

thnx for help me

240
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 02, 2022 Jul 02, 2022

Hi.

 

This error generally happens because the asset cannot be found. Where is your sound file located?

 

Also, your're missing an if keyword and the required parenthesis in the atur_tombol_suara function. Your function should look like this:

function atur_tombol_suara(e:MouseEvent):void
{
	var nama_tombol:String = e.currentTarget.name;
	
	if (nama_tombol == "tombol_matikan_musik");
	{
		posisi = musik.position;
		musik.stop();
		suara_aktif = false;
	}
}

 

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 02, 2022 Jul 02, 2022
LATEST
Thnx you 👍👍👍
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines