Alot of people are wanting to embed flash object,movies or video streams into thier applications these days. I’m going to show some examples and tips & tricks of using the Shockwave Flash object and namespace. VB.NET and the Shockwave object can be very powerful. I’ve used it in several applications including my ‘uStreamer” viewer application.

First things first. Right click on your toolbox and click “Choose Items”. Scroll down and choose the Shockwave Flash Player Object. From your toolbox add a Shockwave Flash control to your form.

To load a movie use the following code. You can specify a url or path using the ‘LoadMovie’ modifer. The first variable, 0, specifies the layer. The layer is not that important to us in the sense of coding with the control. Use the layer ‘0′.

AxShockwaveFlash1.LoadMovie(0, "yourmovie.swf")

The ‘AllowFullScreen’ modifier comes in handy when dealing with movies that try to take over and go fullscreen. You can choose from boolean True/Flase.

AxShockwaveFlash1.AllowFullScreen = True

The ‘StopPlay’ modifier is used to stop the current play state. This is not the same as the ‘Stop’ modifier. Using ‘Stop’ will cause the control to stop it’s current process. Using ‘StopPlay’ will stop the current movie as the current frame.

AxShockwaveFlash1.StopPlay()

Popularity: 34% [?]