Skip to main content
New Participant
July 2, 2022
Question

Error #2044: Unhandled IOErrorEvent:. text=Error

  • July 2, 2022
  • 1 reply
  • 224 views

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

    This topic has been closed for replies.

    1 reply

    JoãoCésar17023019
    Inspiring
    July 2, 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

    New Participant
    July 2, 2022
    Thnx you 👍👍👍