 |

11-11-2005, 08:46 PM
|
|
Newcomer
|
|
Join Date: Nov 2005
Posts: 6
|
|
Unload Me Flash button on VB
|
Hi, there:
Im trying to make a flash button to use on a vb form, wich basic function is to execute Unload Me action, when the button is pressed actually it exit the application, but i get a windows error. This is the code on vb that im using for the button:
PHP Code:
Private Sub swf1_FSCommand(ByVal command As String, ByVal args As String)
If command = "exit" Then
swf1.Stop
swf1.Loop = False
Unload Me
End If
End Sub
And this is the ActionScript code of the button:
PHP Code:
cmd1.onRelease = function() {
fscommand("exit", "");
}
Can anyone tell me whats wrong?
Thanks.
Juan.
|
|

11-13-2005, 03:17 AM
|
 |
Centurion
|
|
Join Date: Sep 2003
Location: Marin county, SF bay area
Posts: 107
|
|
|
Try removing the "function()" from your Action Script:
cmd1.onRelease {
fscommand("exit", "");
}
This works in Flash. I'm unfamiliar, but very curious, about integrating the two....
|
__________________
"The opposite of a correct statement is a false statement. But the opposite of a profound truth may well be another profound truth."
Niels Bohr
|

11-13-2005, 06:38 AM
|
|
Newcomer
|
|
Join Date: Nov 2005
Location: Tacloban, Philippines
Posts: 11
|
|
Quote:
|
Originally Posted by juanstiller
Hi, there:
Im trying to make a flash button to use on a vb form, wich basic function is to execute Unload Me action, when the button is pressed actually it exit the application, but i get a windows error. This is the code on vb that im using for the button:
PHP Code:
Private Sub swf1_FSCommand(ByVal command As String, ByVal args As String)
If command = "exit" Then
swf1.Stop
swf1.Loop = False
Unload Me
End If
End Sub
And this is the ActionScript code of the button:
PHP Code:
cmd1.onRelease = function() {
fscommand("exit", "");
}
Can anyone tell me whats wrong?
Thanks.
Juan.
|
Try cmd1.onRelease() {
}
|
|

11-13-2005, 06:41 AM
|
|
Newcomer
|
|
Join Date: Nov 2005
Location: Tacloban, Philippines
Posts: 11
|
|
Quote:
|
Originally Posted by juanstiller
Hi, there:
Im trying to make a flash button to use on a vb form, wich basic function is to execute Unload Me action, when the button is pressed actually it exit the application, but i get a windows error. This is the code on vb that im using for the button:
PHP Code:
Private Sub swf1_FSCommand(ByVal command As String, ByVal args As String)
If command = "exit" Then
swf1.Stop
swf1.Loop = False
Unload Me
End If
End Sub
And this is the ActionScript code of the button:
PHP Code:
cmd1.onRelease = function() {
fscommand("exit", "");
}
Can anyone tell me whats wrong?
Thanks.
Juan.
|
Try:
cmd1.onRelease() {
fscommand("exit", "");
}
but since the error is from vb, try removing unnecessary code:
Private Sub swf1_FSCommand(ByVal command As String, ByVal args As String)
If command = "exit" Then
Unload Me 'if you're closing only the form
'if you want to end the application, comment the statement above
'and unncomment the statement below
'End
End If
End Sub
|
|

11-14-2005, 11:38 AM
|
|
Newcomer
|
|
Join Date: Nov 2005
Posts: 6
|
|
|
Thanks for the suggestions guys, but due to syntax errors i can´t use
cmd1.onRelease }
the only way is cmd1.onRelease = function() {
}
The error that windows is showing isnt of much help, it doesn´t say any helpfull information. I mean when i press the flash button actually the program ends, but then give me the error. The error mention a txt file i saw that file, but the info is only the exe file (my project) and a lot of parameters like version number , but it does not mention nothing about memory positions or posible causes of the error.
Any ideas?
Thanks, all.
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|