javascript - 无法使 Adob​​e AIR Application UpdaterUI() 工作

标签 javascript air

这是我的问题 - 我正在尝试编写一个 self 更新的应用程序,但我一直收到错误提示 runtime.air.update.ApplicationUpdaterUI() 不返回构造函数。

这是代码的相关部分;还包含其他 javascript 文件,但我认为它们中的任何一个都不会主动破坏 AIR 本身。

<html>
<head>
<script type="text/javascript" src="./js/AIRAliases.js"></script>
<script type="text/javascript" src="./js/jquery-1.3.1.js"></script>
<script src="ApplicationUpdater_UI.swf" type="application/x-shockwave-flash"></script>
<script>
    $(document).ready( function() {
        var appUpdater = new runtime.air.update.ApplicationUpdaterUI();  // line 64 in this example
    }
</script>
</head>
<body> ... stuff ... </body>
</html>

我测试时得到的错误是

    TypeError: Value  is not a constructor. Cannot be used with new.
     at app:/index3.html : 64
     at app:/js/jquery-1.3.1.js : 2912
     at app:/js/jquery-1.3.1.js : 686
     at app:/js/jquery-1.3.1.js : 2916
     at app:/js/jquery-1.3.1.js : 2936

最佳答案

验证 SWF 脚本标记中的路径,我猜您没有正确引用 ApplicationUpdater_UI.swf。

Air 基本上是在提示它找不到 runtime.air.update.ApplicationUpdaterUI() 方法来调用任何地方,这可能意味着它找不到 SWF(或者我认为 SWF 可能已损坏)。

关于javascript - 无法使 Adob​​e AIR Application UpdaterUI() 工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/579830/

相关文章:

actionscript-3 - 项目中整个焦点元素的 Enter 按钮事件的操作脚本

android - 如何从 flash 迁移到 adobe air iOs 和 android?

java - APK 签名无效

actionscript-3 - 在 Actionscript 3 中将键码转换为字符串

javascript - html/jquery 如何在 mouseenter 时将 div 悬停在其子项上

javascript - 如何使用 onLoad 加载 jQuery JSON。从表格上的邮政编码获取城市和州?

javascript - 循环多维数组

javascript - 使用 jQuery 更改后保留元素的值

javascript - Ember js - 切换传递给操作的当前值和先前值

android - java.lang.ClassNotFoundException : Didn't find class "android.support.v4.content.FileProvider" error in Adone AIR native extension 异常