2011-09-21 58 views
0

我得到了一个完整的Mxml和.AS文件的存储库。任务是编辑一个怪物游戏。使用Adobe Flash Builder的操作脚本问题

我已经通过使用新建 - > Flex项目将资源库加载到Flash Builder中,然后将项目位置设置为根存储库。

现在已经加载到Flash Builder,但是当我点击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

您的HTML未生成。以下是一些尝试,我可以说...

Does your bin-debug has MainGameView.html 
  1. 你可以张贴了你MainGameView.mxml文件,应该有一定的错误,不产生你的HTML输出。

  2. 删除maingame.mxml文件的内容,仅包括单独的应用程序标签,看你是否能够产生MainGameView.html在滨调试

+0

我发布的代码 – Tom

+0

@汤姆:什么是你的主要文件,这个视图被称为...我的意思是在你的项目应该是应用程序标签 – Thalaivar