Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>A few things I'd recommend trying (in order of increasing complexity):</p> <ul> <li>base64 encode the data with <a href="https://developer.mozilla.org/en/DOM/window.btoa" rel="nofollow">btoa</a> and set it using a <a href="http://en.wikipedia.org/wiki/Data_URI_scheme" rel="nofollow"><code>data:</code> URI</a>,</li> <li>instead of creating the object using <code>createElement</code>, construct the <code>&lt;object&gt;</code> tag with all attributes as an HTML string (including the base64 advice above), then inject it into a DOM element with <code>innerHTML</code>,</li> <li>create a reflector web service where you POST the swf content, it gives you a URL, then pass the URL off to the object,</li> <li>similar to the previous, create a reflector web service where you POST the swf content, targeting a full-screen IFRAM as the target, have the service spits back an HTML doc including an <code>&lt;object&gt;</code> pointing back to the server.</li> </ul> <p>The later of these options is more intense, and requires round-trips from the server that you'd probably want to avoid - just some more options you might want to consider.</p> <p>ActionScript 3 has a <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Loader.html" rel="nofollow"><code>Loader</code></a> which may be useful as well. I don't know if it supports <code>data:</code> URI's, but if it does, you could write a boot loader SWF which runs the contents of the local swf file directly.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload