Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Interface and Graphics > Unload Me Flash button on VB


Reply
 
Thread Tools Display Modes
  #1  
Old 11-11-2005, 08:46 PM
juanstiller juanstiller is offline
Newcomer
 
Join Date: Nov 2005
Posts: 6
Exclamation 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 StringByVal 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.
Reply With Quote
  #2  
Old 11-13-2005, 03:17 AM
Roscoe's Avatar
Roscoe Roscoe is offline
Centurion
 
Join Date: Sep 2003
Location: Marin county, SF bay area
Posts: 107
Default

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
Reply With Quote
  #3  
Old 11-13-2005, 06:38 AM
nihk nihk is offline
Newcomer
 
Join Date: Nov 2005
Location: Tacloban, Philippines
Posts: 11
Default

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 StringByVal 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() {

}
Reply With Quote
  #4  
Old 11-13-2005, 06:41 AM
nihk nihk is offline
Newcomer
 
Join Date: Nov 2005
Location: Tacloban, Philippines
Posts: 11
Default

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 StringByVal 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
Reply With Quote
  #5  
Old 11-14-2005, 11:38 AM
juanstiller juanstiller is offline
Newcomer
 
Join Date: Nov 2005
Posts: 6
Default

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.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->