flash 调用 脚本_Flash脚本-从Flash控制Visual Basic

flash 调用 脚本

1. Create a new VB project.

1.创建一个新的VB项目。

2. Add the Shockwave Flash ActiveX control to your project. Create an instance of the control in your form.

2.将Shockwave Flash ActiveX控件添加到您的项目中。 在您的窗体中创建控件的实例。

3. Name the control "flashmov".

3.将控件命名为“ flashmov”。

4. Open the code window for your form (i.e the Form_Load event), and add the following code:

4.打开您的表单的代码窗口(即Form_Load事件),并添加以下代码:

'movie.swf is movie file
flashmov.Movie = App.Path & "movie.swf"

Note that the above code assumes that the movie is in the same file as the vb project.

请注意,上面的代码假定影片与vb项目位于同一文件中。

5. You can call vb function from flash by using fscommand.

5.您可以使用fscommand从Flash调用vb函数。

For example, you can create a button in flash and insert the action:

例如,您可以在Flash中创建一个按钮并插入操作:

//the below code is for flash not for vb
fscommand("execute");

6. Create the swf file.

6.创建swf文件。

7. The vb code that responds to the Flash command is:

7.响应Flash命令的vb代码为:

Private Sub flashmov_FSCommand(ByVal command As String,
ByVal args As String)
If command = "execute" then  
MsgBox "Hey i can control vb"
End Sub

8. The code displays a messagebox when you press the Flash button.

8.按下Flash按钮时,代码显示一个消息框。

翻译自: https://www.sitepoint.com/visual-basic-flash/

flash 调用 脚本

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值