|
-
Aug 2nd, 2005, 08:13 PM
#1
Thread Starter
Addicted Member
FLASH + VB question...
How can i send a command from VB to flash. I want to let vb tell flash that when m cursor is over my button my flash button will glow. I've already created my flash and exported it to swf format.
-
Aug 2nd, 2005, 08:17 PM
#2
Re: FLASH + VB question...
This highlights the command button it is over. You may want it to highlight something else. Just change it from Command1.BackColor = vbCyan
to whatever you want.
VB Code:
Option Explicit
Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function GetCapture Lib "user32" () As Long
' Button must be set to Graphical!
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If (X < 0) Or (Y < 0) Or (X > Command1.Width) Or (Y > Command1.Height) Then
ReleaseCapture ' the mouse is no longer over the button, change backcolor to gray
Command1.BackColor = &H8000000F
ElseIf GetCapture() <> Command1.hwnd Then
SetCapture Command1.hwnd ' the mouse is over the button, change backcolor to cyan
Command1.BackColor = vbCyan
End If
End Sub
-
Aug 2nd, 2005, 08:19 PM
#3
Re: FLASH + VB question...
 Originally Posted by dglienna
This highlights the command button it is over. You may want it to highlight something else. Just change it from Command1.BackColor = vbCyan
to whatever you want.
VB Code:
Option Explicit
Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function GetCapture Lib "user32" () As Long
' Button must be set to Graphical!
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If (X < 0) Or (Y < 0) Or (X > Command1.Width) Or (Y > Command1.Height) Then
ReleaseCapture ' the mouse is no longer over the button, change backcolor to gray
Command1.BackColor = &H8000000F
ElseIf GetCapture() <> Command1.hwnd Then
SetCapture Command1.hwnd ' the mouse is over the button, change backcolor to cyan
Command1.BackColor = vbCyan
End If
End Sub
dG, that looks like it has nothing to do with the question, or is it just me
Has someone helped you? Then you can Rate their helpful post. 
-
Aug 3rd, 2005, 02:56 AM
#4
Thread Starter
Addicted Member
Re: FLASH + VB question...
hehehe you are right manavo11.. but thanks anyway for the effort dglienna...
-
Aug 3rd, 2005, 08:19 AM
#5
Re: FLASH + VB question...
-
Aug 3rd, 2005, 09:10 AM
#6
Re: FLASH + VB question...
Check out my sample app http://www.planet-source-code.com/vb...14739&lngWId=1
You can look in the code on how to send data to the flash movie and read it with Actionscript in Flash.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|