错误#1065:未定义变量mx.core :: RSLData

时间:2013-05-21 15:15:59

标签: flex actionscript

我尝试使用以下代码在远程SWF上使用loadStyleDeclarations(使用Flex 4.6):

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" initialize="GetFonts()">

    <fx:Script>
        public function GetFonts():void {
            styleManager.loadStyleDeclarations("http://dev.mycompany.com/fonts/fonts.swf");
            fontLabel.setStyle('fontFamily', 'Arial');
        }   
    </fx:Script>

    <s:Label id="fontLabel" text="This should be Arial!" top="10" />
</s:View>

作为Flex Web应用程序,这非常有效(同一服务器上的目标swf和使用应用程序,不同的文件夹)。作为Flex移动(iOS)应用程序,遇到错误:

ReferenceError: Error #1065: Variable mx.core::RSLData is not defined.
    at style_mx_core_FlexModuleFactory/info()[style_mx_core_FlexModuleFactory.as:77]
    at mx.core::FlexModuleFactory()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:107]
    at style_mx_core_FlexModuleFactory()[style_mx_core_FlexModuleFactory.as:35]
VerifyError: Error #1014: Class mx.modules::ModuleBase could not be found.
VerifyError: Error #1014: Class mx.core::FontAsset could not be found.
ReferenceError: Error #1065: Variable style__embed__font_Arial_medium_normal_657631602 is not defined.
ReferenceError: Error #1065: Variable _class_embed_css_Assets_swf_1392078518_mx_skins_cursor_BusyCursor_762190923 is not defined.

有什么想法吗?找到一个解决方案来添加&#34; -static-link-runtime-shared-libraries = true&#34;到构建路径,但没有解决问题。

0 个答案:

没有答案