[Twisted-web] generating Canvas.swf without needing Flash

Matt Goodall matt at pollenation.net
Sun Feb 13 04:49:24 MST 2005

On Sat, 2005-02-12 at 16:52 -0800, rpiwork at notebookmargins.com wrote:
>Hi Folks,
>I just subscribed to this list because twisted seems like such a
>fascinating thing and was surprised by this post. Is the twisted web
>community interested in swf? I confess to have thought that there would be
>prejudice against it's use in the twisted community. Was this a prejudice
>of my own? Ironic. Has swf truely become that accepted? I hadn't imagined
>it would be.

I think it's fair to say that most people, and not just in the open
source world either, dislike web pages that use Flash *unnecessarily*
but accept that Flash does have some uses. Open source people are
probably more vocal about the issue though ;-).

Anyway, Twisted and Twisted Web do not use Flash. It is only used in one
small part of Nevow (see below). I work on and with Nevow and, so far, I
have not touched the Flash file except for running the examples to see
what fun I'm missing out on ;-).

>Followup questionmarks, and more to the point.
>What is canvas.swf for?

canvas.swf is a small Flash file (movie?) that supports the nevow.canvas
module. nevow.canvas allows the server to actively draw on the canvas in
the browser. canvas.swf also sends user events (mouse clicks etc) back
to the server.

I believe divmod are using canvas in Quotient to render "real-time"
performance graphs, or something like that.

Get Nevow from svn trunk and have a look.

>What would your desires be along these lines?

I'm not sure what you mean by this? Personally, I would like canvas to
keep out of the way ... until I need it. Fortunately, 
that's exactly how it is already.

It's probably worth noting that livepage's predecessor used Flash for
bidirectional communication between client and server. Now that most
browsers support (or will support) JavaScript's XMLHttpRequest, livepage
uses that instead of Flash.

>> On Feb 11, 2005, at 5:57 PM, Stefano Debenedetti wrote:
>>> Hello,
>>> I have done some experiments [1] in generating the Canvas.swf file
>>> using the excellent and free-of-charge KineticFusion SWF compiler [2]
>>> instead of the expensive Flash IDE.
>> This sounds absolutely wonderful. Thank you for trying this; I never
>> would have had time to do so.
>>> At first I simply used an empty RVML file (KF's XML format for
>>> representing SWFs) and tried to include the original canvas.as from
>>> SVN trunk but I got some (I guess trivial) compilation errors due to
>>> KineticFusion being slightly pickier than Flash on ECMAScript syntax.
>> If the errors are trivial, I am +100 on someone pointing me at an
>> environment where I can try this and see the errors, and a guide on how
>> to fix said errors. I would prefer to create ecmascript-compliant code
>> as much as possible (both in canvas and livepage, if possible -- don't
>> know how much the ecmascript standard actually relates to javascript in
>> the wild?)
>>> So I decompiled the original Canvas.swf, cut and pasted all the
>>> ECMAScript code to a new canvas.as and included that one and not only
>>> it works like a charm but the resulting SWF is slightly smaller too.
>> Excellent.
>>> Maybe this will enable future Nevow releases to ship without the
>>> Canvas.fla file, which is then redundant and introduces a dependency
>>> on Flash for people willing to grok it.
>> Yes. I will attempt to get an environment where Canvas.swf can be
>> generated without Flash asap; it irritates me that I have to have Flash
>> running, which is ugly and a pig, just to press Command-0 every time I
>> change the .as file.
>> Donovan
>> _______________________________________________
>> Twisted-web mailing list
>> Twisted-web at twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>Twisted-web mailing list
>Twisted-web at twistedmatrix.com

More information about the Twisted-web mailing list