0

How to inject my javascript code in a .SWF file? I already try to inject but not happens. See teh code:

import flash.external.ExternalInterface;
var script_js :XML = 
<script>
<![CDATA[
function(){ 
alert('test! boom!'); 
}
]]>
</script> 
ExternalInterface.call(script_js);

And how to embed javascript code into a .PDF file or a .GIF file?

  • have you also tried adding a type="text/javascript" or language (or whatever the – Stefan Hegny Apr 12 '17 at 19:08
  • 2
    Your script_js is an XML instance inside Flash application and is **not external**. External refers to environment of the Flash object: HTML page or another wrapper (there are several options). GIF is a primitive graphics format and cannot have embedded scripts AFAIK. PDF: http://stackoverflow.com/questions/9219807/using-javascript-inside-a-pdf – Organis Apr 12 '17 at 20:11

0 Answers0