Here's my stack trace:

ArgumentError: Error #1508: The value specified for argument font is invalid.
        at flash.text::Font$/registerFont()
        at adobe()
        at adobe_mx_core_FlexModuleFactory/create()
        at MethodInfo-819()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at ModuleInfoProxy/moduleEventHandler()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at ModuleInfo/readyHandler()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::FlexModuleFactory/update()
        at mx.core::FlexModuleFactory/docFrameHandler()

I have a Flex application that loads several modules and one of those modules loads runtime styles. Everything works fine if I run the app in a browser. However, I'm trying to load the application into a NativeWindow instance using SWFLoader and I'm getting this error. One thing to note is that I'm using a custom LoaderContext with a new ApplicationDomain(), which solved some class not found exceptions but introduced this weird registerFont() issue.

To explain my particular use case, I have a web-based chat application that I'm trying to use in my AIR app. You open the AIR app, click a chat button which pops up a new NativeWindow instance. I then add a SWFLoader to the NativeWindow and load the chat.swf (the normally-web- based Flex app).

Any help would be greatly appreciated.

Thanks,

Tom

Reply via email to