I have found this cool file-upload repo by mailru, it called FileAPI. The FileAPI uses .swf file as debugging tool. How this works without embedding the .swf file??
It is possible to Communicate Between Flash and JavaScript without embedding
98 Views Asked by ass-king some questions At
2
There are 2 best solutions below
0
On
They can use the File API. Don't confuse it with a name of the Mail.ru library. See this links: https://developer.mozilla.org/en/docs/Web/API/File https://developer.mozilla.org/ru/docs/Web/API/XMLHttpRequest#sendAsBinary()
They seem to be dynamically updating the html page (to now have the SWF embeded). This means using
innerHTMLto generate new content which was not originally coded in the html file. You can check a basic guide about innerHTML here.Looking at FileAPI.js, onwards from line 3590 we see they indeed use
innerHTMLto embed a Flash object. It becomes embeded (dynamically) when the right Javascript function is triggered.Some short snippet of their code is below :