Flash Script - Controlling Visual Basic From Flash

1. Create a new VB project.

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

3. Name the control "flashmov".

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

'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.

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

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

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

6. Create the swf file.

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

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.

Replay

Category: software Time: 2003-04-28 Views: 1
Tags:

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.135 (s). 12 q(s)