Python and Flash

R

rodmc

Can anyone provide me with advice on how easy (or otherwise) it is to
drive a Flash animation (stored locally but displaed in a browser) with
a Python application. Basically information is getting streamed to a
Python client and this is expected to update the Flash animation.

It sounds odd, but it has to be done.

Thanks,

Rod
 
D

Diez B. Roggisch

rodmc said:
Can anyone provide me with advice on how easy (or otherwise) it is to
drive a Flash animation (stored locally but displaed in a browser) with
a Python application. Basically information is getting streamed to a
Python client and this is expected to update the Flash animation.

It sounds odd, but it has to be done.

You can establish a communication over HTTP between the two. Under windows,
COM might be an option, too.

Diez
 
R

Ravi Teja

You have not stated where the Python code needs to reside.

On the server, you can use XML-RPC or SOAP. Flash either supports them
natively or has libraries for those. Your web service servers can be
written in Python. This is the perhaps the best approach.

On the client, Python can be installed as a client side scripting
language within IE on Windows. There used to be an article floating
around on that quite a while ago. Can be deployed as a COM server on
the client too and scripted within the browser. But this is of course
neither a desirable nor portable solution.
 
R

rodmc

Thanks for the help so far.

There are two Python applications involved, one runs on a remote PC
(server) and another on the users PC (client).

The server at present merely receives and sends out messages via an
instant messaging platform. Based on the information it receives via
the IM platform it then updates the Flash application. I guess it could
do it in a number of ways, one method being to send messages to the
Flash application to update the display, or another to update the
visualisation on the server then get the web browser (on the client
PC) to reload it.

Thanks,

rod
 
S

SamFeltus

Why not just have the Python on the server send a JSON string to the
Flash ap? Easy easy. Just use LoadVars on the Flash side.

All that SOAP and XML-RPC sounds might be an needless overcomplication.

Sam the Gardener

http://sonomasunshine.com
 
S

SamFeltus

I aint a professional coder, but a gardener. However, the
Flash->JSON->Python technique works. It is poorly coded, but it is IMO
a very simple way to integrate Flash and Python compared to the methods
normally suggested on the net.

The HTML is just some junk thrown up for people with lower tech
browsers without much thought or consideration.
 
S

SamFeltus

By the way Sybren, if you don't mind, what kinda computer and browser
were you using, trying to figure out which browsers get redirected to
html and which get the Flash Site. If you have Flash plugin, what
version was it?

Thanks,

Sam the Gardener
 
S

sjdevnull

SamFeltus said:
I aint a professional coder, but a gardener. However, the
Flash->JSON->Python technique works. It is poorly coded, but it is IMO
a very simple way to integrate Flash and Python compared to the methods
normally suggested on the net.

The HTML is just some junk thrown up for people with lower tech
browsers without much thought or consideration.

Some people with high-tech browsers don't use Flash for non-technical
reason. The audit clauses in the license allow Macromedia to audit
your computers for license compliance at any time, so some companies
that feel strongly about their data staying away from prying eyes won't
allow it to be installed. It's illegal to install Flash on some
versions of Windows, let alone more esoteric operating systems. Using
the version bundled with IE may skirt some of these issues, I'm not
sure.

see http://www.macromedia.com/shockwave/download/license/desktop/
especially 2(b) and 3(a).
 
S

Sybren Stuvel

SamFeltus enlightened us with:
By the way Sybren, if you don't mind, what kinda computer and
browser were you using, trying to figure out which browsers get
redirected to html and which get the Flash Site.

Mozilla Firefox 1.5, on Ubuntu Linux Breezy.
If you have Flash plugin, what version was it?

Shockwave Flash 7.0 r25

Sybren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,285
Messages
2,571,416
Members
48,108
Latest member
Virus9283

Latest Threads

Top