vb.net 与falsh互相通讯

前端之家收集整理的这篇文章主要介绍了vb.net 与falsh互相通讯前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

flash按钮传数据给vb.net

flash制作一个按扭,将按扭拖到场景中,并命名"button_but",在按扭所在的场景中的第一帖加如下代码

button_but.onPress=function(){
fscommand("gogo","123");
};

gogo:为vb.net中要调用函数

123:要传给vb,net的值

vb.net中

'加载影片

Private Sub Form1_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.Load
AxShockwaveFlash1.Movie = Application.StartupPath & "/test.swf"
End Sub

'点击按钮调用函数

Private Sub gogo(ByVal sender As Object,ByVal e As AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent) Handles AxShockwaveFlash1.FSCommand
TextBox1.Text = e.args.ToString()
End Sub

--------------------------可以加我微信号:googlecao 进行交流------------------------

vb.net传值给flash

flash场景中建名为label1的文本框

vb.net代码如下

Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click AxShockwaveFlash1.SetVariable("label1.text","这是从VB那儿来的的") End Sub

原文链接:https://www.f2er.com/vb/258605.html

猜你在找的VB相关文章