Results 1 to 8 of 8

Thread: Playing Flash swf in the form?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    269

    Playing Flash swf in the form?

    Hi,

    I did put the flash movie playing in the Splash form while waiting for the program load, but the movie just not playing, it display it on the form, but the animation not moving.

    Here is the code

    Private Sub Form_Load()
    ShockwaveFlash1.LoadMovie (0, "C:\Flash.swf")
    ShockwaveFlash1.Visible = True
    ShockwaveFlash1.Play
    End Sub

    Thanks!

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Playing Flash swf in the form?

    Check out my code example in this thread.

    http://vbforums.com/showthread.php?t=328943&
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    269

    Re: Playing Flash swf in the form?

    Quote Originally Posted by RobDog888
    Check out my code example in this thread.

    http://vbforums.com/showthread.php?t=328943&
    Thanks!

    but the problem is the movie don't have a chance to play then the other proccess start.. If nothing to do next after the movie shows then it will play perfectly, but it is in splash screen and that is why there are some task start at the background. Kind like need multithreaded to make this work.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Playing Flash swf in the form?

    I dont recall the swf being modal. Perhaps the 0 in your Loadmovie line of code is setting that?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: Playing Flash swf in the form?

    Put a few DoEvents in your other Form that your trying to load at the same time.

    This is how I play swf movies.
    VB Code:
    1. SWF.LoadMovie 1, App.Path & "\Movie.swf"
    2. SWF.Movie = App.Path & "\Movie.swf"
    3. SWF.Playing = True
    4. 'If you want to
    5. 'SWF.GotoFrame 1
    Last edited by Keithuk; Oct 26th, 2006 at 02:24 PM.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    269

    Re: Playing Flash swf in the form?

    Quote Originally Posted by Keithuk
    Put a few DoEvents in your other Form that your trying to load at the same time.

    This is how I play swf movies.
    VB Code:
    1. SWF.LoadMovie 1, App.Path & "\Movie.swf"
    2. SWF.Movie = App.Path & "\Movie.swf"
    3. SWF.Playing = True
    4. 'If you want to
    5. 'SWF.GotoFrame 1
    Problem is I'm not trying to load other form at the same time. after the splash screen comes up then load the swf movie then it start the long process at the background which is no UI, just pulling data from mainframe. It takes about 1 mintue to finish the process then unload the splash screen and main form comes up.

    What I want is when processing the data, let the swf movie playing on the splash screen at the same time.

    Thanks!

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    269

    Re: Playing Flash swf in the form?

    Quote Originally Posted by mapperkids
    Problem is I'm not trying to load other form at the same time. after the splash screen comes up then load the swf movie then it start the long process at the background which is no UI, just pulling data from mainframe. It takes about 1 mintue to finish the process then unload the splash screen and main form comes up.

    What I want is when processing the data, let the swf movie playing on the splash screen at the same time.

    Thanks!

    I did tried to convert the swf to animated GIF and create a picture box in the splash screen then insert the GIF in it, it still not working, ( not animated)

  8. #8
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: Playing Flash swf in the form?

    Quote Originally Posted by mapperkids
    after the splash screen comes up then load the swf movie then it start the long process at the background which is no UI, just pulling data from mainframe.
    Try some DoEvents in this long process.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

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