So here's what I've found out in just a few minutes.
The issue has to do with Adobe's TLF engine implementation. They wrote their own custom preloader to load the runtime shared library that contains the TLF engine.
The issue specifically is that you cannot cast a swf as an interface when using the TLF engine. This has nothing to do with Gaia. This is not Gaia's fault.
I will report this to the Flash team.
Here's a simple example to prove that it has nothing to do with Gaia.
Make a main.fla and give it this document class:
package
{
import flash.display.Loader;
import flash.display.MovieClip;
import flash.events.Event;
import flash.net.URLRequest;
public class Main extends MovieClip
{
private var loader:Loader;
public function Main()
{
super();
init();
}
private function init():void
{
addChild(loader = new Loader());
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.load(new URLRequest("other.swf"));
}
private function onLoadComplete(event:Event):void
{
ICustom(loader.content).customFunc();
}
}
}
Make other.fla and give it this document class:
package
{
import flash.display.MovieClip;
import fl.text.TLFTextField;
public class Other extends MovieClip implements ICustom
{
public var TLF_Foo:TLFTextField;
public function Other()
{
super();
}
public function customFunc():void
{
trace("custom func called");
}
}
}
Here's the ICustom interface class:
package
{
public interface ICustom
{
function customFunc():void;
}
}
This is what you will see.
TypeError: Error #1034: Type Coercion failed: cannot convert Other__Preloader__@2dedf121 to ICustom.
at Main/onLoadComplete()
I'm glad you ran into this. It's a nasty bug that the Flash team needs to fix.