Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 如何在移动flex应用程序中加载interactive.swf?_Apache Flex_Flash_Embed_Interactive_Mobile Application - Fatal编程技术网

Apache flex 如何在移动flex应用程序中加载interactive.swf?

Apache flex 如何在移动flex应用程序中加载interactive.swf?,apache-flex,flash,embed,interactive,mobile-application,Apache Flex,Flash,Embed,Interactive,Mobile Application,我有一个移动应用程序,我正试图用它加载一个交互式的.swf文件。起初,我只是打算使用flex中我的另一个项目文件中的.mxml应用程序,但它们用于桌面应用程序,并且运行在flex 3.6上,移动应用程序不能构建在低于4.5:P的平台上 所以,我想我应该将第一个项目导出到一个.swf中,并将其加载到我的移动应用程序中,但我所做的一切都不会让它显示出来。有人知道解决办法吗 代码如下: <?xml version="1.0" encoding="utf-8"?> <s:View xm

我有一个移动应用程序,我正试图用它加载一个交互式的.swf文件。起初,我只是打算使用flex中我的另一个项目文件中的.mxml应用程序,但它们用于桌面应用程序,并且运行在flex 3.6上,移动应用程序不能构建在低于4.5:P的平台上

所以,我想我应该将第一个项目导出到一个.swf中,并将其加载到我的移动应用程序中,但我所做的一切都不会让它显示出来。有人知道解决办法吗

代码如下:

<?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="Task Graphic Novels">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:SWFLoader width="100%" height="100%"
                 loadForCompatibility="true"
                 id="bookLoader" enabled="false"/>
    <fx:Script>
        <![CDATA[
            import 
        ]]>
    </fx:Script>
    <s:List height="100%" width="100%">
        <s:itemRenderer>
            <fx:Component>
                <s:IconItemRenderer height="100" labelField="name" 
                                    iconField="photo" iconHeight="70" 
                                    iconWidth="54" messageFunction="getMessage">
                    <fx:Script>
                        <![CDATA[
                            import spark.components.NavigatorContent;
                            protected function getMessage(o:Object):String
                            {
                                return o.message;
                            }
                        ]]>
                    </fx:Script>
                </s:IconItemRenderer>
            </fx:Component>
        </s:itemRenderer>
        <s:dataProvider>
            <s:ArrayCollection>
                <fx:Object name="Breach an Obstacle" photo="@Embed('assets/img/sumeco/beach/title.jpg')" message=""/>
                <fx:Object name="Conduct a Raid" photo="@Embed('assets/img/sumeco/title.jpg')" message=""/>
            </s:ArrayCollection>
        </s:dataProvider>
        <s:change>
            <![CDATA[
            if(event.currentTarget.selectedItem.name == "Beach")
//here's where i'm trying to load the swf  {bookLoader.enabled=true; bookLoader.load(new U    RLRequest("assets/BookDemo.swf"));}
                else if(event.currentTarget.selectedItem.name == "Title"){}
                ]]>
            </s:change>
        </s:List>
</s:View>


我认为这行不通,因为您正在尝试加载本地swf。我认为它需要通过互联网加载,即便如此,为什么你要在本地加载swf?为什么不直接调用它?

哦,另外,如果你要通过网络,你需要添加权限。我如何直接调用它?我相信你可以将它嵌入到源代码中:
验证错误:错误#1053:在mx.managers.SystemManagerProxy中非法覆盖activate。VerifyError:错误#1014:找不到类mx.graphics::RoundedRectangle。引用错误:错误#1065:未定义变量_SWFLoaderStyle u嵌入_css _资产_swf u代理_113275806。ReferenceError:Error#1065:Variable BookDemo uu embed mxml assets img sumeco Break an障碍U title jpg 1106297139未定义。
它似乎在从我编译swf的原始文件中查找资源?我没有得到任何错误,只是没有加载:/截至目前,单击该项目与单击第二个项目相同,没有。您的目标平台是什么?iOS不可能。iOS根本不可能?即使swf包含在打包的应用程序中也不行?