pyqt5界面打开flash(.swf)文件

最近发现了一个挺厉害的人工智能学习网站,内容通俗易懂,风趣幽默,感兴趣的可以点击此链接进行查看:床长人工智能教程

 废话不多说,请看正文!

打开flash文件

网上关于pyqt5的内容特别少,对于查找一些东西很麻烦,很多东西都要跑去QT去看,参照才能搞好。

下面直接上代码:

from PyQt5 import QtCore, QtGui , QAxContainer, QtWidgets
   
class Ui_Flash(QAxContainer.QAxWidget):
    def __init__(self, parent = None):
        super(Ui_Flash, self).__init__()
        
        self.resize(800, 600)  #设置窗口的大小
        self.setControl("{D27CDB6E-AE6D-11cf-96B8-444553540000}")  #flash的com接口
        self.dynamicCall("LoadMovie(long,string)", 0, "D:\教育数据包\同步教学资源\初中\数学\八年级上册\等腰三角形.swf")
        self.show()
        
if __name__=="__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    ui = Ui_Flash()
    ui.show()
    sys.exit(app.exec_())

运行结果如下:

网上找的一些com接口

Control

CLSID

ScriptMoniker

06290BD3-48AA-11D2-8432-006008C3FBFC

SoapActivator

ECABAFD0-7F19-11D2-978E-0000F8757E2A

SoapMoniker

ECABB0C7-7F19-11D2-978E-0000F8757E2A

PartitionMoniker

ECABB0C5-7F19-11D2-978E-0000F8757E2A

QueueMoniker

ECABAFC7-7F19-11D2-978E-0000F8757E2A

HTMLApplication

3050F4D8-98B5-11CF-BB82-00AA00BDCE0B

ScripletContext

06290BD0-48AA-11D2-8432-006008C3FBFC

ScripletConstructor

06290BD1-48AA-11D2-8432-006008C3FBFC

ScripletFactory

06290BD2-48AA-11D2-8432-006008C3FBFC

ScripletHostEncode

06290BD4-48AA-11D2-8432-006008C3FBFC

ScripletTypeLib

06290BD5-48AA-11D2-8432-006008C3FBFC

ScripletHandler_Automation

06290BD8-48AA-11D2-8432-006008C3FBFC

ScripletHandler_Event

06290BD9-48AA-11D2-8432-006008C3FBFC

ScripletHandler_ASP

06290BDA-48AA-11D2-8432-006008C3FBFC

ScripletHandler_Behavior

06290BDB-48AA-11D2-8432-006008C3FBFC

XMLFeed

528D46B3-3A4B-4B13-BF74-D9CBD7306E07

Scriptlet

AE24FDAE-03C6-11D1-8B76-0080C744F389

HtmlFile_FullWindowEmbed

25336921-03F9-11CF-8FD0-00AA00686F13

Mhtmlfile

3050F3D9-98B5-11CF-BB82-00AA00BDCE0B

Microsoft HTA Document 6.0

3050F5C8-98B5-11CF-BB82-00AA00BDCE0B

DHTMLEdit.DHTMLEdit.1

2D360200-FFF5-11D1-8D03-00A0C959BC0A

DHTMLSafe.DHTMLSafe.1

2D360201-FFF5-11D1-8D03-00A0C959BC0A

VB Script Language

B54F3741-5B07-11cf-A4B0-00AA004A55E8

VB Script Language Authoring

B54F3742-5B07-11cf-A4B0-00AA004A55E8

VBScript Language Encoding

B54F3743-5B07-11cf-A4B0-00AA004A55E8

VBScript Host Encode

85131631-480C-11D2-B1F9-00C04F86C324

Shockwave Flash Object

D27CDB6E-AE6D-11cf-96B8-444553540000

Macromedia Flash Factory Object

D27CDB70-AE6D-11cf-96B8-444553540000

Microsoft Silverlight

DFEAF541-F3E1-4c24-ACAC-99C30715084A

Adobe Shockwave Player

233C1507-6A77-46A4-9443-F871F945D258

SWFTools is a collection of utilities for working with Adobe Flash files (SWF files). The tool collection includes programs for reading SWF files, combining them, and creating them from other content (like images, sound files, videos or sourcecode). SWFTools is released under the GPL. The current collection is comprised of the programs detailed below: • PDF2SWF A PDF to SWF Converter. Generates one frame per page. Enables you to have fully formatted text, including tables, formulas, graphics etc. inside your Flash Movie. It's based on the xpdf PDF parser from Derek B. Noonburg. • SWFCombine A multi-function tool for inserting SWFs into Wrapper SWFs, contatenating SWFs, stacking SWFs or for basic parameter manipulation (e.g. changing size). • SWFStrings Scans SWFs for text data. • SWFDump Prints out various informations about SWFs, like contained images/fonts/sounds, disassembly of contained code as well as cross-reference and bounding box data. • JPEG2SWF Takes one or more JPEG pictures and generates a SWF slideshow from them. Supports motion estimation compression (h.263) for better compression of video sequences. • PNG2SWF Like JPEG2SWF, only for PNGs. • GIF2SWF Converts GIFs to SWF. Also able to handle animated gifs. • WAV2SWF Converts WAV audio files to SWFs, using the L.A.M.E. MP3 encoder library. • AVI2SWF Converts AVI animation files to SWF. It supports Flash MX H.263 compression. Some examples can be found at examples.html. (Notice: this tool is not included anymore in the latest version, as ffmpeg or mencoder do a better job nowadays) • Font2SWF Converts font files (TTF, Type1) to SWF. • SWFBBox Allows to read out, optimize and readjust SWF bounding boxes. • SWFC A tool for creating SWF files from simple script files. Includes support for both ActionScript 2.0 as well as ActionScript 3.0. • SWFExtract Allows to extract Movieclips, Sounds, Images etc. from SWF files. • AS3Compile A standalone ActionScript 3.0 compiler. Mostly compatible with Flex. SWFTools
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zpeien

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值