Activate your free membership today | Log-in

Thursday, October 15th, 2009

Even Crazier Times: HTML Rendering… in Flash

Category: Flash, HTML, Library

On Monday we saw someone rewriting an HTML renderer in Canvas. Continuing the fun times we see an open source project that does the same thing, but using Flash ActionScript thanks to one of the comments on our last post:

wrapper

Wrapper is a cross-browser compliant HTML/CSS rendering engine written in ActionScript that sits on top of your standards compliant HTML page. Wrapper eliminates cross-browser issues and makes integrating ActionScript and HTML/CSS projects possible without needing to compile.Wrappers strives to answer the most common problems web designers face without forcing them to learn too many new things. Most web sites can be created in HTML or CSS, then when you need to extend Wrapper’s capabilities you can either use JSON to call functions within ActionScript or you can load compiled plug-ins. Wrapper also has built in methods within CSS to load custom fonts, display elements as any shape, and fill them with linear or radial gradient background colors. ActionScript’s event model is also implemented within Wrapper’s HTML. Wrapper’s best features are the ones that you get for free because of how it is set up. It’s like getting all the great features of the Flash Player without needing to deal with compiling and being able to create your content the same way any HTML page would be created. Wrapper is fully accessible to the search engines and integrates well with any back-end technology.

Wrapper is currently released as a fully functional open source beta for Flash Player 9. Wrapper is set up as a pre-compiled plug-in but can easily be integrated into any Flex or AIR applications or even as an ActionScript framework for creation of compiled projects.

Check out the demos:

Posted by Brad Neuberg at 6:30 am
16 Comments

++---
2 rating from 47 votes

16 Comments »

Comments feed TrackBack URI

Whats next, ActionScript parsing JavaScript ;)?

Comment by V1 — October 15, 2009

The next big one will be a tool to convert Flash into JavaScript/HTML/CSS.

Comment by pmontrasio — October 15, 2009

How about Google’s ChromeFrame in Flash? :)

Comment by zachleat — October 15, 2009

Hey, I created HTMLWrapper 2 years ago now. I’ve actually worked on versions that have full ECMAScript/JavaScript parsers within them. The problem is the resulting swf is larger than most people will want to use (~250kb) but this is very possible and I dont know why Adobe isn’t going this route. In the end we already have ActionScript which is much faster and more powerful then a runtime JavaScript parser will ever be.

I am working on now is full HTML5 and CSS3 support wrapped into a MVC container that has an interface much like Ruby On Rails which uses HTML simply as a mechanism to render your views. It is important for me to keep this code base small and compact but over time I have realized that people need more functionality, so the next version is going to answer a lot of peoples concern about this. I wont release anything until everything is tested and documented but thanks for the attention.

If you are interested and want to help with development, it would be greatly appreciated. Also if you live in NYC and wanted to talk about my this any more I run a local user group FlashCodersNY

Comment by talltyler — October 15, 2009

There’s a few projects that can create output to Flash or HTML/JavaScript. Most of you probably know about Openlaszlo and there is also Haxe which can compile to a number of other languages also, JavaScript, Flash, PHP and many more.

Comment by talltyler — October 15, 2009

Looks very good!

We’ve been working on an AS3 HTML/CSS parser, and we are currently including it in one of our projects. It works pretty well, but we’re just using it, because of some legacy systems spitting out HTML code, but the data needs to be rendered in Flash. We only support a small subset of HTML elements, as well as CSS properties, although we also incorporated a few HTML5 and CSS3 elements/properties.

We might release our code under an open license. What will the license of Wrapper be?

Comment by MartijnHoutman — October 15, 2009

Ah, lovely. Reinventing the wheel by using 12 smaller wheels.

I honestly can’t decide if this is something that some people might consider useful or if it’s a joke.

Comment by justinph — October 15, 2009

Tweeted:

Flash should include WebKit so that webpages can be embedded! Better than htmlwrapper, and a no-install Google Chrome Frame. (like AdobeAIR)

Can Flash Components be built with arbitrary binaries? I seem to remember Flash codecs and other 3rd party Flash “extensions” that I was prompted to install which the SWF depended on. Could WebKit (or Chrome) be such a dependency that is downloaded and then displayed within Flash?

Comment by westonruter — October 15, 2009

Adobe could include the Webkit version they ship as part of AIR with the Flash Player. I head they don’t want to do this because it would increase the download size of the Flash Plugin… In my opinion this is stupid, if they included a current webkit with Flash and this new version of the Flash Plugin had spread across enough computers many web developers would consider using Flash for rendering in Internet Explorer. In comparison to Chrome Frame the Flash Plugin is already installed on most computers and is also allowed in most corporate IE6 environments.

Comment by AndiSkater — October 15, 2009

I actually think it makes a lot of sense to ship your renderer with your document- call me tired of browser incompatibility. ;-P

There are actually a bunch of other actionscript projects that have been trying to do this for years, including one called DENG. There is also basic html support in the Flex Framework 4.x (and in Text Layout Framework – same code base).

http://deng.com.br/

Comment by CaptainN — October 15, 2009

” In the end we already have ActionScript which is much faster and more powerful then a runtime JavaScript parser will ever be”
.
So… How’s that cave you’ve been living in the last 2 years?

Comment by Breton — October 15, 2009

I don’t have any benchmarks, but javascript (at least in webkit) should not be much slower than AS3. The biggest problem ob JavaScript right now is the lack of a “ByteArray” binary data type. Strings or normals Arrays are just not as fast as a native ByteArray type can be. I hope this will change in near future.

Comment by AndiSkater — October 15, 2009

The last commit date shows February 2008. Why took it so long for Ajaxian to publish this ? Just a late birthday present ?

Comment by Rusco — October 15, 2009

“” In the end we already have ActionScript which is much faster and more powerful then a runtime JavaScript parser will ever be””

Firefox 3.5 and Actionscript 3.0 both use the Mozilla tracemonkey JIT engine to compile ecmascript to bytecode…

So ActionScript and JavaScript will use the same engine type in FF 3.5.

Comment by V1 — October 19, 2009

It does crash in Chrome.

Comment by jayarjo — October 20, 2009

GH337, as a digital mobile phone, empire wedding dresseswhether it is performance or other aspects are much better than the analog phones could also say that empire waist wedding dresseswas the fashion trend.Ericsson T68: the first color screen mobile phone Ericsson T68 was launched in the finalstrappless empire waist wedding dresses of a cell phone, but also a location in the high-end mobile phones, evening formal dressesit is the emergence of the mobile phone world has become Behind colorful.Ericsson GH398: Custom ring tones plus size evening dressescan be the first mobile phone Ericsson has brought unconventional way this could be composing cheap flower girl dresses ringtones GH398,Unfortunately, mobilephones have not yet popular in that era, which ended in failure.Ericsson T39mc: wedding dressthe first built-in Bluetooth-enabled mobile phone August 2001 Ericsson released the world’s first built-in Bluetooth chip for mobile phones T39mc,Empire Halter Satin WeddingDresswhich is Ericsson’s first tri-band GSM and GPRS high-speed Internet-ready phones.Ericsson R250 PRO: the first three anti-cell phonewedding dressR250 PRO is the first with a waterproof,Empire Halter Chiffon Wedding Dress shockproof, dust-proof function of the “three defenses” outdoor-type mobile phone. It is in the third quarter of 1999 to the market.

Comment by wuwei — November 9, 2009

Leave a comment

You must be logged in to post a comment.