# convert code embedding swf file into a js file

**URL:** <https://forum.kirupa.com/t/convert-code-embedding-swf-file-into-a-js-file/638094>\
**Category:** flash\
**Created:** [April 18, 2018, 6:02pm UTC](https://forum.kirupa.com/t/convert-code-embedding-swf-file-into-a-js-file/638094 "2018-04-18T18:02:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajoo](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@ajoo](https://forum.kirupa.com/u/ajoo)\
**Post date:** [April 18, 2018, 6:02pm UTC](https://forum.kirupa.com/t/convert-code-embedding-swf-file-into-a-js-file/638094/1 "2018-04-18T18:02:10Z")

</div>

Hi all.

The code embedding the swf file using AC\_RunActiveContent.js looks as below:

```
<script type="text/javascript" >
AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','800','height','580','align','middle','src','FlashWebsite','quality','high','bgcolor','#ffffff','name','FlashWebsite','allowscriptaccess','sameDomain','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','FlashWebsite' );
</script>

```

I would like to run this off a .js file so that this could be CSP compatible & would replace the above code.

i would be much obliged for this.

Thanks all !!
