- Home /
Getting "Error #2044: Unhandled IOErrorEvent. text=Error #2124: Loaded file is an unknown type." when trying to load UnityGame.swf from a different swf.
Hey there,
being relatively new to Unity and only having had a couple of projects in Flash, I am running into a problem loading the swf file exported from Unity.
From inside the Flash SWF, I have a class called Game.as, which loads the Unity exported SWF:
private function onAddedToStage(event:Event):void
{
somePreloaderScreen = new SomePreloaderScreen();
somePreloaderScreen.addEventListener(Event.COMPLETE, onFadeOutComplete);
addChild(somePreloaderScreen);
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
//InitScore();
//InitTimer();
loadUnity();
}
private function loadUnity():void
{
var params:UnityLoaderParams = new UnityLoaderParams(false,640,360,false,true,false); // original settings: true,640,360,false,true,false -
// We disable automatic scaling to stage, set a size and disable the standard preloader.
unityContentLoader = new UnityContentLoader('Rocketman.swf', this, params, false);
unityContentLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onUnityContentLoaderProgress);
unityContentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onUnityContentLoaderComplete);
unityContentLoader.loadUnity();
}
I am using FlashDevelop for the project. If I run it with FlashDevelop in Debug, it imports fine and can be played. When I run it locally, using an index.html running my Flash SWF which then imports the Unity SWF, it runs fine as well.
However when starting the Flash SWF directly by double clicking it, it throws the following exception:
Error #2044: Unhandled IOErrorEvent. text=Error #2124: Loaded file is an unknown type.
Original (German) Error:
Error #2044: IOErrorEvent unverarbeitet. text=Error #2124: Die geladene Datei weist einen unbekannten Typ auf.
Also when uploading the files to a webserver and opening the index.html there, I am getting the same error.
Anyone got any hint on what could be causing this?
Thx in advance!
Sven
Answer by tonyarabish · Nov 29, 2018 at 08:34 AM
i use Avdshare Video Converter to Convert any SWF file to MP4, AVI, MKV, ASF, MPEG-2, MTS, ProRes, etc for using SWF on iPhone, iPad, iPod, Android, PSP, Zune, FCP, Sony Vegas, EDIUS, and any other portable device, media player or video editing programs.https://www.avdshare.com/convert-swf-to-mp4-on-mac-or-windows
Your answer
Follow this Question
Related Questions
Footsteps not playing on Flash Export 1 Answer
Import swf into unity 2d 4 Answers
Object from flash to unity 2 Answers
Unity 4.0 Flash Export load->unload->load crash 0 Answers
Is it possible to embed a unity build inside a .swf (or vice versa)? 0 Answers