Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling ActionScript from Python. Is that possible?

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.

like image 439
Maxim Avatar asked Mar 16 '26 11:03

Maxim


1 Answers

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)
like image 70
Zophiel Avatar answered Mar 18 '26 23:03

Zophiel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!