VB .NET flash

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2008
Posts: 3
Reputation: kyriakos70 is an unknown quantity at this point 
Solved Threads: 0
kyriakos70 kyriakos70 is offline Offline
Newbie Poster

VB .NET flash

 
0
  #1
Apr 20th, 2008
Hi,
I have a project in VB 2005 and I have inserted a flash movie (.swf), the item from the vb toolbox ax shockwave flash active x object returned an error "error activex make sure it is properly registered" so I create one through code :

  1. Imports AxShockwaveFlashObjects.AxShockwaveFlash
  2. Public Class Form3
  3. Dim webAddress As String = "http://www.vbforfree.com"
  4. Dim flash As New AxShockwaveFlash

Now I loaded the flash movie and send a variable to flash through Visual Basic
code :
  1. Private Sub Form3_keydown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
  2. Me.Focus()
  3. If e.KeyCode = Keys.D6 Then
  4. a = a + 10
  5. flash.SetVariable("/:playerbalance", a)

Everything OK but when I try to send from flash to VB I get nothing
flash code :
  1. on (press)
  2. {
  3. fscommand("flashMessage", "Hi C-Sharp");
  4. }
VB code to receive variable code :
  1. Private Sub flash_FSCommand(ByVal sender As Object, ByVal e As AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent)
  2. If (e.command = "flashMessage") Then
  3. RichTextBox1.AppendText(e.args + "\n")
  4. End If
  5.  
  6. End Sub
flash is the dim for the shockwaveflash activex object.
When I managed once to drag a shockwaveflash from toolbox once I succed it worked but now I don't know if there is a special property to add to the code created flash object to make it receive vars. Help please.

Kyriakos
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 11
Reputation: Byaptia is an unknown quantity at this point 
Solved Threads: 0
Byaptia Byaptia is offline Offline
Newbie Poster

Re: VB .NET flash

 
0
  #2
Apr 23rd, 2008
Hi,

I think the Flash/VB article on http://www.adobe.com/devnet/flash/articles/flash_vb.pdf may be helpful in this discussion.

This popular white paper is written by some engineering folks from our organization Mindfire Solutions (http://www.mindfiresolutions.com).

I hope you find it useful!

Cheers,
Byapti
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC