CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: SWF Flash Movie

  1. #1
    Join Date
    Sep 2013
    Posts
    1

    Lightbulb SWF Flash Movie

    Hello Everyone

    I am new comer to this Forum and I need some help. Actually, I am having a problem with Visual Basic 2008. I started working on VB long time ago and I am trying to solve that:

    I have a simple code to play a flash movie in VB 2008. The only problem I have is that after running the code the movie starts playing only after the Axshockwaveflash object is clicked. What can I add to my code to run the movie right after clicking the start button?

    Thank you for your help and time.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: SWF Flash Movie

    Will something like this help in your Form_Load :

    Code:
    		Dim strFileName As String 'FileName
            
    		'Filter For OFD
    		ofdOpen.Filter = "FLA Files|*.fla|ShockWave Files|*.swf|All Files|*.*"
            
    		strFileName = ofdOpen.FileName 'Browse PC For Suitable Files
            
    		If ofdOpen.ShowDialog = Windows.Forms.DialogResult.OK Then 'If Valid File Selected
                
    			FlashMedia.LoadMovie(0, strFileName) 'Load
                FlashMedia.Play() 'Play
    
                PlayToolStripMenuItem.Text = "Pause" 'Change 'Play' To 'Pause'
    
            End If
    Sometimes, you have to load the movie first, before playing it, as shown with the two bolded lines

Tags for this Thread

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

Featured