📜 ⬆️ ⬇️

Smokescreen - "Flash Player Written in Javascript"

I recently saw a Smokescreen topic link — a flash to html5 \ js converter ; I decided to translate the information I’ve already read online about this new tool. In short: Smokescreen is a new open source project aimed at converting Flash to JavaScript / HTML5 for better interaction with a web page where previously it was not possible.
With it, you can extend the support of your project to new platforms without learning new tools, Flash is automatically converted to JavaScript / HTML5. Smokescreen will be released under the open source license and will be distributed free of charge. The cost of support and maintenance will be low so you can make sure that Smokescreen works exactly the way you need it. The library will give you a wide range of tools for development, including development in JavaScript, without using ActionScript, and development with Flash connected to the project's HTML pages.

Project description from the authors


You are probably familiar with the fact that Adobe Flash does not work on any Apple mobile device. Moreover, it seems that Apple will never allow Flash to run on an iPhone / iPod / iPad.
These facts paint a bleak picture for online advertising on mobile devices. Many people still want to use existing Adobe tools to create advertising, and replacing these tools with others for the sake of one single platform (iPhone / iPod / iPad) looks silly. As an advertising network, we believe that online advertising is more attractive than boring static ads, so we had to choose one of the options: live in the dark, in the desert world of boring mobile ads or do something.
We direct all Smokescreen efforts there as a preliminary right now. In the future, we expect to add support for more Flash features, fix bugs, and improve performance. This is just the beginning. Smokescreen currently supports significant Flash 8 animation capabilities, streaming sound, sound effects, some input capabilities, and basic ActionScript.

The principle of the library


Chris Smoak's Smokescreen, “javascript flash player”, is an incredible thing. It works completely in a browser window, reads SWF files, unpacks them (using pure JS), extracts images and embedded audio files, packages them with base64 and inserts them into an HTML page as data: uri, vector graphics are assembled into animated SVG . In the debugger (Chrome Web Inspector) you can see how the SVG changes in real time while playing the demo. Smokescreen even implements its own ActionScript bytecode interpreter. [...] The only thing that worries me is the performance of the library - it has a volume of 175 KB and more than 8,000 lines of code, which can lead to problems on low-powered mobile devices.

Library demo demonstrating


Demos show Smokescreen in action. Silent demos are compared with their Flash options on the same page. Since Smokescreen is written in JavaScript, it runs slower than the Flash plugin, speed is limited by browser performance. Until we apply more tricks to increase the speed, some demos will not work at a satisfactory speed on the iPad / iPhone / iPod.
')
Use the latest browser version. Smokescreen currently runs Firefox 3.6, Chrome 5, Safari 4, and MobileSafari. There are known issues with Opera 10.5 Opera which will be fixed. Doesn't work in IE, even though IE9 looks promising.

Swf Animated Movies Displayed with Smokescreen

Demo for Win, Mac, and Linux platforms


Animation banners


Demo for Win, Mac, Linux, iPad, iPhone, and iPod)


Demo for Win, Mac, Linux, and iPad


Smokescreen video on iPad



Links


The following resources were used to prepare the article:

For those who want to try


Since the library has not yet been officially presented, there are no references to it (only the pre-release was announced). In the future, as noted above, the library will be available under an open source license. For familiarization purposes, you can use the repository of Simon Willison , who posted the library code marked:
I posted an uncompressed version (the TextMate Bundles command -> JavaScript -> Reformat Selection was used) here: http://gist.github.com/418177

For informational purposes only - the library code is not yet open.

Source: https://habr.com/ru/post/95890/


All Articles