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, which loads the Unity exported SWF:

		private function onAddedToStage(event:Event):void
			somePreloaderScreen = new SomePreloaderScreen();
			somePreloaderScreen.addEventListener(Event.COMPLETE, onFadeOutComplete);
			removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
		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);

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!


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.Convert SWF to MP4 on Mac or Windows – Avdshare