VB.NET integration with Flash in Visual Studio 2015 (community)

I am currently developing a VB.NET project. I want the VB.NET project to control the actions of the Flash projector. (Stop, play, change text control text in Flash projector, etc.) This is a one-way control, but nothing about the SWF projector will interact with the VB.NET project.

The image below shows what I want to do.

The ideal goal of the application

EDIT: Well, I managed to get the SWF object available for placement in the project. So now my question is: how do I get two (Visual Studio and SWF object, which is included in other form windows) for interaction. That is, if I press a button on VisualBasic, I can call the function in AS3 / SWF to do something and get the variable from the Visual Basic form.

The AS3 code contains the following

function fl_ClickToGoToWebPage(event:MouseEvent):void { lblText.text = "Congrats! It Works!"; } btnChange.addEventListener(MouseEvent.MOUSE_UP, fl_ClickToGoToWebPage); 

Here is a photo of the actual SWF.

Mock swf

What I would like to do is call this function (or some similar function) that passes information to the SWF projector (executed as an ActiveX Flash object in Visual Studio) from the VB form. (Ignore the button on the actual SWF, this button will not be present in the final run) I have two problems:

1) How to change addEventListener so that it can take more than one parameter or is there another event or function that I could use?

2) How to call this function from Visual Studio as part of a sub or function from VS / VB.NET?

I do not need to reciprocate, as in Visual Studio, getting information from SWF.

+5
source share
2 answers

I just checked the quick test with sendkeys and it worked fine; it was based on:

setting flashplayer as the foreground window ...

Friend declares SetForegroundWindow Lib function "user32" (ByVal hWnd Like IntPtr) As Integer

and then using the sendkeyes command

System.Windows.Forms.SendKeys.SendWait

+2
source

I would suggest checking socket connections. They are easily associated with C ++, and Flash supports them:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/Socket.html

+2
source

Source: https://habr.com/ru/post/1233982/


All Articles