469,360 Members | 1,782 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,360 developers. It's quick & easy.

Python and Flash

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

Feb 6 '06 #1
11 2895
rodmc wrote:
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
Feb 6 '06 #2
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.

Feb 6 '06 #3
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

Feb 8 '06 #4
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

Feb 28 '06 #5
SamFeltus enlightened us with:
PS. Here is an example...

http://sonomasunshine.com/sonomasunshine/FrontPage.html


The HTML version of that site is crap, by the way. Check out
http://sonomasunshine.com/cgi-bin/ol...name=FrontPage

The HTML is sent as text/plain, and if interpreted as HTML, it's not
compliant with any HTML standard.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
Feb 28 '06 #8
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.

Feb 28 '06 #9
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

Feb 28 '06 #10
SamFeltus wrote:
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/...cense/desktop/
especially 2(b) and 3(a).

Feb 28 '06 #11
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
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
Feb 28 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Randy | last post: by
5 posts views Thread by Sean Berry | last post: by
13 posts views Thread by Alexander May | last post: by
reply views Thread by Samuel M. Smith | last post: by
6 posts views Thread by planetthoughtful | last post: by
49 posts views Thread by SamFeltus | last post: by
reply views Thread by John Ling | last post: by
3 posts views Thread by Putty | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.