我获得了一个包含Mxml和.AS文件的存储库。任务是编辑一个鼹鼠游戏。
我已使用new - >将存储库加载到Flash构建器中。然后我将Flex项目的项目位置设置为根存储库。
它现在已加载到Flash构建器中但是当我单击maingame文件上运行maingame时,它不会运行,我收到一条错误消息说
File not found: file:/C:/Users/Tom/Desktop/DubitPlatform-Co/bin-debug/MainGameView.html
我出错的任何想法?
由于
这是maingameview.mxml文件的代码
<?xml version="1.0" encoding="utf-8"?>
<views:MainGameViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:views="uk.co.dubit.whackamole.views.*"
xmlns:components="uk.co.dubit.whackamole.views.components.*"
styleName="stretchToContainer">
<fx:Declarations>
<s:Sequence id="startAnimation" effectEnd="startAnimationEnd()">
<s:Sequence id="readyAnimation" target="{readyLabel}" >
<s:Parallel duration="400">
<s:Fade alphaFrom="0" alphaTo="1" />
<s:Scale scaleXFrom="0" scaleYFrom="0" scaleXTo="1" scaleYTo="1" />
</s:Parallel>
<s:Pause duration="1000" />
<s:Fade alphaFrom="1" alphaTo="0" duration="100" />
</s:Sequence>
<s:Sequence id="goAnimation" target="{goLabel}" >
<s:Parallel duration="400">
<s:Fade alphaFrom="0" alphaTo="1" />
<s:Scale scaleXFrom="0" scaleYFrom="0" scaleXTo="1" scaleYTo="1" />
</s:Parallel>
<s:Pause duration="1000" />
<s:Fade alphaFrom="1" alphaTo="0" duration="100" />
</s:Sequence>
</s:Sequence>
</fx:Declarations>
<s:VGroup width="100%" height="100%" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" gap="10">
<s:HGroup width="100%" height="100%" gap="10">
<s:BorderContainer styleName="roundedBorder" minHeight="0" minWidth="0" width="66%" height="100%" >
<s:Label id="readyLabel" text="Ready?" fontSize="72" color="0xffffff" verticalCenter="0" horizontalCenter="0" alpha="0">
<s:filters>
<s:GlowFilter color="0x000000" strength="10" />
</s:filters>
</s:Label>
<s:Label id="goLabel" text="Go!" fontSize="72" color="0xffffff" verticalCenter="0" horizontalCenter="0" alpha="0">
<s:filters>
<s:GlowFilter color="0x000000" strength="10" />
</s:filters>
</s:Label>
<s:DataGroup
id="moleHolesDataGroup"
dataProvider="{ moleHoles }"
itemRenderer="uk.co.dubit.whackamole.views.MoleHoleItemRenderer"
verticalCenter="0" horizontalCenter="0">
<s:layout>
<s:TileLayout requestedRowCount="3" requestedColumnCount="3" horizontalGap="10" verticalGap="10" />
</s:layout>
</s:DataGroup>
</s:BorderContainer>
<s:VGroup width="33%" height="100%" gap="10">
<s:BorderContainer styleName="roundedBorder" minHeight="0" minWidth="0" width="100%" height="30" >
<s:Label text="Achievements" verticalCenter="0" horizontalCenter="0" />
</s:BorderContainer>
<s:BorderContainer styleName="roundedBorder" minHeight="0" minWidth="0" width="100%" height="100%" >
</s:BorderContainer>
</s:VGroup>
</s:HGroup>
<s:BorderContainer styleName="roundedBorder" minHeight="0" minWidth="0" width="100%" height="30" bottom="10" >
<s:Label text="Score: { mainGame.score }" left="10" verticalCenter="0"/>
</s:BorderContainer>
</s:VGroup>
</views:MainGameViewBase>
我不是100%确定这是我应该运行以便能够玩游戏的文件。该文件会使游戏可执行文件?
答案 0 :(得分:0)
您的HTML未生成。以下是我可以说的一些尝试......
Does your bin-debug has MainGameView.html
你可以发布你的MainGameView.mxml文件,应该有一些错误没有生成你的html输出。
删除maingame.mxml文件的内容,只包含Application标记,看看你是否能够在bin-debug中生成MainGameView.html