swf2js Documentation

repository·master·Indexed 20 days ago

https://github.com/ienaga/swf2js

A JavaScript FlashPlayer emulator that converts Adobe Animate (Flash) SWF files into HTML in real time. Part of the Next2D project, it supports SWF files from Flex, Flash, and Animate, with varying ActionScript and WebGL support between the Free and Production versions.

Tokens
377
Snippets
2
Records
3
Agent score
21%

What's inside swf2js

  1. What is swf2js?

    master
    swf2js is a JavaScript-based FlashPlayer emulator that performs real-time analysis of Adobe Animate (Flash) SWF files and converts them into HTML. It provides compatibility for SWF files created across various platforms, including Flex, Flash, and Animate.
  2. How to use swf2js in HTML

    master

    To use the emulator, include the swf2js.js script in your HTML document and call the swf2js.load() method with the path to your SWF file.

    <script type="text/javascript" src="swf2js.js"></script>
    <script type="text/javascript">
        swf2js.load('SET SWF PATH');
    </script>
  3. Compare Free vs Production versions of swf2js

    master

    The capabilities of swf2js depend on whether you are using the Free Version or the Production Version. Key differences include ActionScript support (up to 2.0 in Free vs 3.0 in Production), WebGL support, and filter/blend mode availability.

    | | Free Version | Production Version |
    | --- | --- | --- |
    | ActionScript | 1.0, 2.0 | 3.0 |
    | Compression | ZLIB | ZLIB/LZMA |
    | WebGL | × | FullWebGL |
    | Filters | DropShadow/Blur/Glow/Bevel | ALL Available. |
    | Blend Modes | 50% | ALL Available. |
    | Video | × | MP4/Flv(60%) |