我开始使用Haxe了。完成所有设置后,我应该准备好了,但是当我运行任何项目时,它会打开一个带有空白屏幕的Flash Player。没有预加载器,不是文本,只是Project.xml中指定的任何颜色的屏幕。
我花了一天时间寻找解决方案,但还没有运气。
我已仔细检查以确保所有内容都是最新的。
我已从多个IDE和命令行运行该项目。
我尝试过运行自己的项目,演示,HelloWorld等。
其他Flash项目运行良好。我只对Haxe项目有这个问题。
所有内容都会产生相同的结果:一个空白的Flash Player。
花了这么多时间寻找解决方案,我几乎是肯定的,它必须是一个非常愚蠢的东西,我忽略了。
这是Project.xml:
<?xml version="1.0" encoding="utf-8"?>
<app title="HelloWorld" file="HelloWorld" main="Main" version="0.0.1" company="HaxeFlixel" />
<!--The flixel preloader is not accurate in Chrome. You can use it regularly if you embed the swf into a html file
<!--or you can set the actual size of your file manually at "FlxPreloaderBase-onUpdate-bytesTotal"!-->
<app preloader="flixel.system.FlxPreloader" />
<!--Minimum without FLX_NO_GAMEPAD: 11.8, without FLX_NO_NATIVE_CURSOR: 11.2 -->
<set name="SWF_VERSION" value="11.8" />
<!--------------------------------WINDOW SETTINGS------------------------------->
<!--These window settings apply to all targets-->
<window width="640" height="480" fps="60" background="#000000" hardware="true" vsync="true" />
<!--Web-specific-->
<window if="web" orientation="portrait" />
<!--Desktop-specific-->
<window if="desktop" orientation="landscape" fullscreen="false" resizable="true" />
<!--Mobile-specific-->
<window if="mobile" orientation="landscape" fullscreen="true" width="0" height="0" />
<!--------------------------------PATHS SETTINGS-------------------------------->
<set name="BUILD_DIR" value="export" />
<classpath name="source" />
<assets path="assets" />
<!--------------------------------LIBRARIES------------------------------------->
<haxelib name="flixel"/>
<!--In case you want to use the addons package-->
<!--haxelib name="flixel-addons" /-->
<!--In case you want to use the ui package-->
<!--haxelib name="flixel-ui"/-->
<!--In case you want to use nape with flixel-->
<!--haxelib name="nape" /-->
<!--------------------------------HAXEDEFINES----------------------------------->
<!--Enable the Flixel core recording system-->
<!--haxedef name="FLX_RECORD" /-->
<!--Disable the right and middle mouse buttons-->
<!--haxedef name="FLX_NO_MOUSE_ADVANCED" /-->
<!--Disable the Native cursor api for Flash target-->
<!--haxedef name="FLX_NO_NATIVE_CURSOR" /-->
<!--Optimise inputs, be careful you will get null errors if you don't use conditionals in your game-->
<!--haxedef name="FLX_NO_MOUSE" if="mobile" /-->
<!--haxedef name="FLX_NO_KEYBOARD" if="mobile" /-->
<!--haxedef name="FLX_NO_TOUCH" if="desktop" /-->
<!--haxedef name="FLX_NO_GAMEPAD" /-->
<!--Disable the Flixel core sound tray-->
<!--haxedef name="FLX_NO_SOUND_TRAY" /-->
<!--Disable the Flixel sound management code-->
<!--haxedef name="FLX_NO_SOUND_SYSTEM" /-->
<!--Disable the Flixel core focus lost screen-->
<!--haxedef name="FLX_NO_FOCUS_LOST_SCREEN" /-->
<!--Disable the Flixel core debugger. Automatically gets set whenever you compile in release mode!-->
<haxedef name="FLX_NO_DEBUG" unless="debug" />
<!--Enable this for Nape release builds for a serious peformance improvement-->
<haxedef name="NAPE_RELEASE_BUILD" unless="debug" />
<!--------------------------------CUSTOM---------------------------------------->
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
FIX: Windows为.swf文件提供了不同的默认播放器。我把它改成了正确的版本,一切正常。
答案 0 :(得分:0)
听起来你正在使用FlashDevelop。
您可以发布Project.xml的内容以及您拥有的任何.hxml构建文件吗?
您可能希望使用自己的compile.hxml文件,因为这样做 允许您使用更多编译选项。为了实现这一目标 项目 - &gt;属性 - &gt;启用&#34;没有输出&#34;。这将完全 禁用编译。然后就去构建 - &gt;预构建命令行 并插入&#34; path \ to \ haxe \ haxe.exe&#34; &#34;路径\ tohxml \ compile.hxml&#34 ;.点击 好。无论何时编译,测试或运行,FlashDevelop都将使用您的hxml 文件。您甚至可以在FlashDevelop中编辑hxml文件。
答案 1 :(得分:0)
如果您使用的是普通版和旧版Flash Player而不是调试版,则可能会出现空白的Flash播放器窗口。如果有任何异常,您将看不到它。
检查您的Flash Player版本并确保您也使用调试版。它必须是11.8+,因此它可以支持游戏手柄,原生光标等。
检查this page是否有最新版本,并确保您正在为您的操作系统下载投影仪内容调试程序
答案 2 :(得分:0)
有几件事导致这种情况:
以下是如何使其发挥作用:
从https://www.adobe.com/support/flashplayer/downloads.html下载Flash Player投影仪内容调试器。请务必获取调试器版本。这可能有点令人困惑;在我下载的时候,对于Netscape兼容的浏览器而言,这是一个链接,并且#34;即使它是一个独立的可执行文件。我下载的文件名为 flashplayer_14_sa_debug.exe 。将此文件放在方便的位置。
在存储调试播放器的同一位置,创建一个名为 play.bat 的新批处理文件,并使其内容如下所示。如果您的名称与 flashplayer_14_sa_debug.exe (%~dp0
之后的部分)不同,请输入正确的Flash Player投影机可执行文件名称:
@"%~dp0flashplayer_14_sa_debug.exe" "%2"
在FlashDevelop中,我们现在告诉它使用 play.bat 作为其Flash播放器。从工具菜单中,选择程序设置... ,然后选择插件下的 FlashViewer 项。在窗格的右侧,单击外部播放器路径的路径区域,然后单击省略号(...)按钮以浏览播放器。找到您在上面的步骤中创建的 play.bat 文件,然后点击打开按钮。然后关闭对话框。
您现在应该能够从FlashDevelop进行播放和调试。关键是使用 play.bat 来取出&#34; / c&#34; FlashDevelop尝试传递给Flash Player的选项,这是导致空白屏幕的原因。