如果没有 Flash Player 的调试版本,Flex 应用程序将无法运行 [英] Flex app not working without debug version of Flash Player

查看:34
本文介绍了如果没有 Flash Player 的调试版本,Flex 应用程序将无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,当我试图向我的老板展示我的工作(一些 Flex 应用程序)的结果时,我很惊讶在我的电脑上运行得很好的应用程序,在我老板的电脑上没有正确显示(唯一可见的是默认的灰色背景).经过 3 小时的尝试,终于当我将他的 Flash Player 版本从标准版本更改为调试版本(都是 v. 10.0.22.87)时,该应用程序终于出现了.有谁知道这可能是什么原因(任何编译器标志或某事).强迫我的老板安装 debug FP 是可以的,但强迫应用的最终用户这样做是不可接受的.

Recently, when I tried to show the results of my work (some Flex app) to my boss, i was quite suprised that application which run perfectly well on my pc, on my boss' pc wasn't displayed properly (the only thing visible was a default grey background). After 3h of trying absolutely everything, finally the app showed up when I changed his Flash Player version from standard one to debug (both was v. 10.0.22.87). Does anyone know what can be the reason of this (any compiler flag or sth). Forcing my boss to installing debug FP was quite ok, but forcing final user of the app to do so is unacceptable.

谢谢

PS:显示我的意思是在我的电脑上部署到 Tomcat 并给我的老板一个应用程序的链接.我们都使用Win XP.此外,当我为 Netscape 浏览器安装 debug FP 和 IE 的标准 FP(在我的电脑上)时,结果是相同的 - 在 Firefox、Opera、Chrome 和 IE 中的灰色背景中工作.我已将其编译为 Debug 和 Release.我使用的是 Flash Develop 3.0.2 RTM

PS: By showing I mean deploying to Tomcat on my pc and giving my boss a link to the app. We both use Win XP. Also when I installed debug FP for Netscape browsers and standard FP for IE (on my pc) the result is the same - working in Firefox, Opera, Chrome and grey background in IE. I've compiled both as a Debug and as a Release. I'm using Flash Develop 3.0.2 RTM

像这样将我的应用程序剥离后 - 它仍然只能在调试 FP 中工作

After stripping my app to sth like this - it still works only in debug FP

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:ca="components.*"
    xmlns:ea="components.editAreas.*"
    layout="vertical"
    backgroundColor="black">

    <mx:Canvas id="header"
        verticalScrollPolicy="off"
        horizontalScrollPolicy="off"
        styleName="header"
        width="100%"></mx:Canvas>

    <mx:Canvas id="mainContent"
        width="100%" height="100%"
        verticalScrollPolicy="off">
    </mx:Canvas>

</mx:Application>

推荐答案

几天前我遇到了同样的问题.

The same kind of issue i faced few days back.

我正在使用以下代码

//调用函数traceDetails(new Error())

//Call To The Function traceDetails(new Error())

私有函数traceDetails(err:Error):void{err.getStackTrace()}就我而言,我使用的是getStackTrace()"方法.这里要记住的是,getStackTrace() 方法仅适用于 Flash 调试器,不适用于 Flash 播放器.因此,只要我没有安装 Flash Debugger,我的应用程序就会停止运行.

private function traceDetails(err:Error):void { err.getStackTrace() } On My part i was using the method "getStackTrace()" Here the thing to remember is that getStackTrace() method is only available with Flash Debugger and Not With Flash player. So Wherever i do not have Flash Debugger installed my application stops running.

所以要做的事情1. 检查您是否使用了仅在 Flash Debugger 中可用而在 Flash player 中不可用的任何 API 调用(如果您发现尝试注释该行应用程序将开始运行).2. 解决在您运行应用程序的任何地方或在您的 Flash Debugger API 调用之前安装 Flash Debugger 版本检查是否仅使用这些 API 或跳过这些行.

So Things to do 1. Check if Your using any API call that are only available in Flash Debugger and Not in Flash player(If You found Try commenting that line Application will start running). 2. Work around Install Flash Debugger Version wherever you are running your application or Simply before your Flash Debugger API calls Check if(Capabilities.isDebugger) only then use those API or Skip those lines.

我相信这会解决您的问题

I am sure this will solve your problem

快乐编码:)

这篇关于如果没有 Flash Player 的调试版本,Flex 应用程序将无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆