Results 1 to 4 of 4

Thread: Unload Form By Clicking on Flash Button

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2002
    Posts
    22

    Unload Form By Clicking on Flash Button

    Hi,

    I am trying to unload a form from clicking on a Flash Button!

    I have been using the FSCommand function, to enable me to click on flash buttons in VB, but when I try to unload the form, it forces me to close VB and says:

    'VB has caused an error in SWFlash.OCX'

    I have managed to put the code I need on a command button:
    The command buttons Cancel property is set to true!

    Private Sub cancel_Click()
    'Since I am using a database, I set the connections to nothing, incase I want to reopen this form later
    Set rsControls = Nothing
    Set cnControls = Nothing

    'Show the next form I want to view
    menu_form.Show

    'Unloads the last form I was on
    Unload admin_form
    End Sub

    The above code works fine on a command button, but not on FSCommand for my flash buttons! This is the first code that I cant get to work, from clicking on the flash!!! Must have something to do with either the cancel property, as there isnt one for flash components, or unloading!!!

    Any help, will be appreciated, Thanks, Matt

  2. #2
    Fanatic Member
    Join Date
    Jun 2000
    Posts
    537
    it's been along time since i've used flash in vb but could you put the component on a button?
    like as a picture on the button. the user will think it is just a flash image but the code behind it will be on the button.

    this probably won't work or you would have done it but that's my first thought.

    i don't have flash on this machine so i can't test it for ya
    pnj

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2002
    Posts
    22
    I finally solved it,

    I dont why it doesnt work on FSCommand, but if you put the code under Flash_Button_GotFocus() it allows you to close the form.

    Any one know why, FSCommand didnt work for the unload??

    Matt

  4. #4
    Fanatic Member
    Join Date
    Jun 2000
    Posts
    537
    couldn't tell ya
    i never had any luck using FScommand.
    i allways found a way to get what i wanted done using javascript or something else.

    are you using flash 5?
    pnj

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width