pythonCOM with Flash
Guyon Morée
gumuz at looze.net
Fri Jun 13 04:22:46 EDT 2003
hmmm, this is the first time I see this amfphp, but this is somewhat what I
was thinking of when I heard about the the python/flash combination.
So, I am very interested in this, but I need to dig a little bit deeper into
this stuff.
keep me updated
"Doug" <doug at notAvalidEmail.com> wrote in message
news:dO0Ga.57821$4_1.15158275 at twister.nyc.rr.com...
> I'm also very interested in flash/python. in paticular porting amfphp to
> python. i'm pretty busy recently with work but would like to get in touch
> with others who feel they might be interested in porting amfphp to python.
> if you reply to this i'll email you privately if you want, my email in
this
> post is no-valid.
>
> Cheers,
> Doug
>
> "Guyon Morée" <gumuz at looze.net> wrote in message
> news:3ee87647$0$13808$4d4ebb8e at news.nl.uu.net...
> > I am afraid that I can not answer this question for you, but I am very
> > interested in the Flash/Python combination though. I allways like to try
> out
> > new gui/code combinations.
> >
> > Please let me know if you have any url's or something like that
> >
> >
> > "Bradley Schatz" <bradley at greystate.com> wrote in message
> > news:RvPFa.37$zx6.1430 at news.optus.net.au...
> > > Hi,
> > >
> > > I am attempting to use Flash as a UI for a python program. I have
> > > successfully prototyped this using VB/Flash, and am not trying to
> convert
> > it
> > > over to work with python.
> > >
> > > My problem is this, when I run the following code (attached below)
> nothing
> > > happens.
> > >
> > > I assume that the Flash activex component needs to be placed in some
> > > container to be seen, as I am not seeing any window come up when I run
> > this.
> > >
> > > Could anyone suggest how to embed this into a container?
> > >
> > > Many thanks,
> > >
> > > Bradley
> > >
> > >
> > >
> > > # Flashevents - test flash/python interop
> > > from win32com.client import DispatchWithEvents, Dispatch
> > > import msvcrt, pythoncom
> > > import time, sys
> > > import types
> > >
> > > import threading
> > > stopEvent = threading.Event()
> > >
> > > def TestFlash():
> > > class FlashEvents:
> > > def OnFSCommand(self, command, args):
> > > print "FSCommend" , command
> > > def OnProgress(self, percentDone):
> > > print "PercentDone", percentDone
> > > def OnReadyStateChange(self, newState):
> > > print "State", newState
> > >
> > > e = DispatchWithEvents("ShockwaveFlash.ShockwaveFlash",
FlashEvents)
> > > e.seen_events = {}
> > > e.LoadMovie(0,
> > > "http://atomfilms.shockwave.com/afassets/flash/hump_starwars.swf")
> > > e.Play()
> > > if not _WaitForFinish(e, 10000):
> > > e.Quit()
> > >
> > >
> > >
> > > def _WaitForFinish(ob, timeout):
> > > end = time.time() + timeout
> > > while 1:
> > > if msvcrt.kbhit():
> > > msvcrt.getch()
> > > break
> > > pythoncom.PumpWaitingMessages()
> > > stopEvent.wait(.2)
> > > if stopEvent.isSet():
> > > stopEvent.clear()
> > > break
> > >
> > > return 1
> > >
> > >
> > > def test():
> > > import sys
> > > TestFlash()
> > >
> > > if __name__=='__main__':
> > > test()
> > >
> > >
> > >
> >
> >
>
>
More information about the Python-list
mailing list