If swf file is embedded in html it is easy to call ActionScript methods via ExternalInterface using JavaScript. Now I want to use the swf file outside of a browser and still be able to access its methods, but now I want to use Python to call ActionScript. Is it possible? There is so little information about it in the Internet. Probably I can use AMF (pyAmf) for this, can I?
Thanks in advance.
If you want to use the swf in such a manner outside the browser investigate AIR or localconnection.
[Edit] You can use Python to listen for ExternalInterface events. osflash.org has something you could look into, albeit a little outdate:
http://osflash.org/ext_howto
or some example Python:
def ExternalCall(self,evt):
print "ExternalCall", evt.request
ret = "<object><property><string>Sample data</string></property></object>"
self.movie.SetReturnValue(ret)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With