如何在 Flex 中获得 HTML5 FileApi 支持? [英] How can I have HTML5 FileApi Support in Flex?

查看:27
本文介绍了如何在 Flex 中获得 HTML5 FileApi 支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要 Flex 代码来支持 HTML5 文件 API.因为我需要为那些不支持文件 API 的浏览器支持文件 API 功能.你有任何代码或链接吗?

解决方案

我有几件事要说.首先是 Flash File API仅 AIR,因此不能在基于浏览器的应用程序中工作.FileReference 可在浏览器应用中使用,但取决于您要明确执行的操作.

在 JavaScript 和 ActionScript 之间进行通信;您可以使用 ExternalInterface.>

您可以使用 ExternalInterface 从 ActionScript 调用 JavaScript 函数.相关信息.

您还可以使用 ExternalInterface 从 JavaScript 调用 ActionSCript 函数.这里有一些相关信息.

I need Flex code to support HTML5 File API. Because I need to support File API feature for those browsers that did not support File API. Do you have any code or link?

解决方案

I a few things to say. First most of the Flash File API is AIR only, so will not work in a browser based application. FileReference will work in a browser app, but depends on what you're trying to do explicitly.

To communicate between JavaScript and ActionScript; you can use ExternalInterface.

You can use ExternalInterface to call JavaScript functions from ActionScript. Info on that.

You can also use ExternalInterface to call ActionSCript functions from JavaScript. Here is some info on that.

这篇关于如何在 Flex 中获得 HTML5 FileApi 支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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