是Adobe AIR的openWithDefaultApplication()在AJAX SDK中不可用吗?

时间:2010-07-08 23:00:43

标签: air

我可以找到的Adobe AIR openWithDefaultApplication()函数的唯一文档是Flex SDK中的教程。 Flex是否需要使用此功能?

通过JavaScript调用它会导致:

TypeError: Value undefined does not allow function calls.

我正在使用的代码:

var poster = air.File.applicationDirectory.resolvePath('posters/CR-1/CR-1.pps');
air.trace(poster); // [object File]
poster.openWithDefaultApplication();

1 个答案:

答案 0 :(得分:1)

应用程序文件可能设置为.... < application xmlns =“http://ns.adobe.com/air/application/1.5”>

您必须将其更改为

< application xmlns =“http://ns.adobe.com/air/application/2.0”>

让2.0 +功能工作....