1

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?

halfer
  • 19,824
  • 17
  • 99
  • 186
Tareq
  • 1,999
  • 2
  • 28
  • 57
  • 1
    I suppose the File API is JavaScript, so you'll have to use [ExternalInterface](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html) – RIAstar Feb 04 '12 at 10:37
  • Using the ExternalInterface class, you can call an ActionScript function in the Flash runtime, using JavaScript in the HTML page. The ActionScript function can return a value, and JavaScript receives it immediately as the return value of the call. This is for using AS command from JavaScript. But I need the reverse for those browsers that did not support File API. Please help. – Tareq Feb 04 '12 at 10:45

1 Answers1

1

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.

JeffryHouser
  • 39,401
  • 4
  • 38
  • 59