Forum Moderators: open
1. Use javascript & SOAP to call a webservice
2. This webservice will return a .swf file in base64 String format
3. I need to display this data into browser. In other words, I need to embed this flash data somehow....
Additional requirement: Everything has to be done in a simple (local) .html file, There should be absolutely no websever involed in the *client* side.
1 and 2 are done, and what i receive is a base64 String. What I have now is only Javascript and maybe Shockwave Flash.
There are 2 options that I can do
1. Save the base64 String into a .swf file. *IF* this can be done, embedding the .swf data to browser is of course no problem
But JS has a lot of problems with reading/writing binary files. Moreover, it seems only IE has some support for this, Firefox seems like a little hope. So i now think of solution 2.
2. I know nothing about Flash. But i'm hoping that there are someway that Flash Plugin Engine is intelligent enough to write the base65 binary data directly into the embedded part of the browser.
Please, webmasters, tell me how to attack this problem?
Thank you for reading
My method would be to have your server talk to the other server, get the swf, and deliver it to the client as a standard file. If you want to do it by AJAX or similar, have it deliver an embed element (<embed...) which points to a location on your server where the .swf will be streamed down.
The data URL scheme is interesting, i've read it, but haven't found out what the status of this RFC yet....Googling....Also, it seems it's only appropriate for "short" data.
The server is currently *only* offering a webservice, so if I understood your method correctly, saving the .swf at the server and returning only the URL to client is not a choice in this case. Of course, it would be much better I agree.
Or any other workaround, everyone?
Now i'm going to post a thread in Javascript subforum, hoping there will be some nice way to write binary files to local disk...