Hello,
I am developing a VB.NET Windows application that plays SWF and FLV files in
popup windows.
The user presses a button on the main application form, a window pops up, and
the Flash media will then play (in theory :frown;).
I was successful in getting SWF files to play. First, I added the Shockwave
Flash Object AciveX control to my toolbox (VB.NET named it AxShockwaveFlash1),
and then double clicked it to add it to my popup form. Then, in the startup
routine for my popup, I added the following lines to play my SWF:
AxShockwaveFlash1.Movie = "path/filename.swf"
AxShockwaveFlash1.Play()
I attempted exactly the same approach using a separate form for an FLV file,
this time of course setting the Movie property of the Shockwave Flash Object to
"path/filename.flv". In this case, the FLV file did not play. There were no
error messages, but just a popup screen with nothing on it.
Can anyone advise as to what I need to do?
Thanks!!!!
MotionMaker - 14 May 2007 15:27 GMT
"There were no error messages, but just a popup screen with nothing on it."
Generally this indicates a security issue or a missing component.
Stu Engelman - 15 May 2007 02:18 GMT
Hi Lon,
Thanks very much for your reply.
Could you please amplify on your response? How would I go about determining
what the specific problem is? At present, I am utilizing Adobe/Macromedia's
Flash9b.OCX component as my automation server. Is this component capable of
playing FLV files? Is my syntax as supplied in my initial post correct?
Thanks again, Stu
MotionMaker - 15 May 2007 19:09 GMT
I reviewed your first post again.
The flv is a Flash digital video file.
The swf is a Flash Movie.
It may be in your case an swf is needed that in turn will play the flv.
JeffTaylorUK - 21 May 2007 15:18 GMT
I'm having a similar problem...
I've been given a bunch of swf (And an flv) files to load into a vb.net
container. There is a master.swf which holds the menu, and this is supposed to
call the other .swf file to populate the menu. However, the other files are not
loaded. I am suspecting that it's a path issue, but not being an active script
person (This is my first foray) I haven't a clue where to begin. It's also
possible that the axShockwaveFlash1.allowscriptaccess needs to be set, but I
can't find a value to set it with, if it can be set even!
Anyone any ideas?
MotionMaker - 21 May 2007 19:59 GMT
Swfs require and OBJECT and EMBED tag. The document containing those tags set the default internal path for the Flash movie they load.
Flvs require a swf to load them.
JeffTaylorUK - 23 May 2007 11:13 GMT
I discovered what the problem was. The control has a play command, but it
doesn't do what you think it does! It just forces the entire movie to play from
end to end without user interaction.
Basically if you have a swf that loads other swf files or flv's, you just need
the following
'Set up the Flash container
Me.AxShockwaveFlash1.Top = Me.Top
Me.AxShockwaveFlash1.Left = Me.Left
Me.AxShockwaveFlash1.Width = Me.Width
'Make sure you over write the taskbar gap at the bottom
Me.AxShockwaveFlash1.Height = Me.Height + 28
Me.AxShockwaveFlash1.AllowFullScreen = True
Me.AxShockwaveFlash1.LoadMovie(0, MovieFileName)
This code is attached to a full screen, modeless form (That is... it has no
title bar, or buttons at the top) the control is then resized to fit the
dimensions of the fullscreen form, but you have to add 28 pixels to the bottom
in order to make sure the taskbar is over-written (Although the form is full
screen, for some reason the .height property only returns the height of the
form minus the taskbar)
Note: Don't use axShockwaveFlash1.Play() !
Oh, and if you're trying to play flv's, embed them in a swf first. As has been
said above.
MotionMaker - 23 May 2007 18:35 GMT