Flash .swf in a userform of vba project

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Flash .swf in a userform of vba project

Post by sal21 »

Can i use and run a .swf macromedia file in a userform of excel?
Possible?

User avatar
Leif
Administrator
Posts: 7209
Joined: 15 Jan 2010, 22:52
Location: Middle of England

Re: Flash .swf in a userform of vba project

Post by Leif »

Leif

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Flash .swf in a userform of vba project

Post by HansV »

Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: Flash .swf in a userform of vba project

Post by sal21 »

HansV wrote:Yes, using the Shockwave Flash object - seeEmbedding flash movies on userforms using the Shockwave Flash Object library.
Hans difficult to insert this in a userform can you send me example with atteched file?
tks.

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Flash .swf in a userform of vba project

Post by HansV »

Have you placed a Shockwave Flash object on your userform?
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: Flash .swf in a userform of vba project

Post by sal21 »

HansV wrote:Have you placed a Shockwave Flash object on your userform?
Ok to lunch the swf... but i cannot intercept the click event on icon...

the original code is a vb6 code but i need to use in a vba userform:

Private Sub swfWelcome_FSCommand(ByVal command As String, ByVal args As String)
MsgBox "You clicked on: " & command
End Sub

here the original link:
http://www.Planet-Source-Code.com/vb/sc ... 2&lngWId=1

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Flash .swf in a userform of vba project

Post by HansV »

You have set the EmbedMovie property of the ShockWaveFlash control to False, so the movie is linked to your hard disk. This means that it will not run on any other PC.

But even if I use the .swf that you attached earlier, it doesn't do anything. What do you want to do with the movie?
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: Flash .swf in a userform of vba project

Post by sal21 »

HansV wrote:You have set the EmbedMovie property of the ShockWaveFlash control to False, so the movie is linked to your hard disk. This means that it will not run on any other PC.

But even if I use the .swf that you attached earlier, it doesn't do anything. What do you want to do with the movie?
two question:
- how to not set the path c:\eccc... and use the movie from all
- i nedd to use the click event on one icon
similar:
if i click on one icon the msgbox("eccc.")

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Flash .swf in a userform of vba project

Post by HansV »

If you set the EmbedMovie property of the ShockWaveFlash control to True, the move specified in the Movie property will be embedded in the userform, so that other users can see it too.

I can't view the movie, so I have no idea what icon you mean, and therefore I can't answer your second question.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: Flash .swf in a userform of vba project

Post by sal21 »

HansV wrote:If you set the EmbedMovie property of the ShockWaveFlash control to True, the move specified in the Movie property will be embedded in the userform, so that other users can see it too.

I can't view the movie, so I have no idea what icon you mean, and therefore I can't answer your second question.
the swf is here is named welcome:
http://www.eileenslounge.com/viewtopic ... rn false;

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Flash .swf in a userform of vba project

Post by HansV »

I know, but I cannot play it on my PC. I only see a still image with a bit of text.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: Flash .swf in a userform of vba project

Post by sal21 »

HansV wrote:I know, but I cannot play it on my PC. I only see a still image with a bit of text.
possible?
I use ver 2003 of excel and i see correct the animation(!?)...

In other case the click event in vb6 work in a vb6 project:

Private Sub swfWelcome_FSCommand(ByVal command As String, ByVal args As String)
MsgBox "You clicked on: " & command
End Sub

but the code:

Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args As String)
MsgBox "You clicked on: " & command
End Sub

not generate nothing if i click in one icon in movie!!!

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Flash .swf in a userform of vba project

Post by HansV »

Sorry, I have no idea. I wouldn't use a shockwave movie on a userform, it's buggy and you have no guarantee that it'll work on other PCs.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: Flash .swf in a userform of vba project

Post by sal21 »

HansV wrote:Sorry, I have no idea. I wouldn't use a shockwave movie on a userform, it's buggy and you have no guarantee that it'll work on other PCs.
peraphs you need to copy the dir ICONS from original project into the same path where is the excel file...
Please dowlod the complete file from PSC posted..

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Flash .swf in a userform of vba project

Post by HansV »

OK, that helped - I now see the icons rotating. But the ShockwaveFlash1_FSCommand doesn't do anything when I click on an icon. I don't have the slightest idea why, so I can't help you - sorry.

I *still* wouldn't use a shockwave movie on a userform, it's buggy and you have no guarantee that it'll work on other PCs.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: Flash .swf in a userform of vba project

Post by sal21 »

HansV wrote:OK, that helped - I now see the icons rotating. But the ShockwaveFlash1_FSCommand doesn't do anything when I click on an icon. I don't have the slightest idea why, so I can't help you - sorry.

I *still* wouldn't use a shockwave movie on a userform, it's buggy and you have no guarantee that it'll work on other PCs.
:sad: :sad: :sad: :sad: :scratch: