VB.NET 2008 & Shockwave Flash

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()

About Dremation

I'm just a computer programmer/site desinger.
This entry was posted in General, Programming and tagged , , , , , , , , , , . Bookmark the permalink.

6 Responses to VB.NET 2008 & Shockwave Flash

  1. SteimdogMillionaire says:

    I have Shockwave Flash object embedded in my VB.net app, and can get a stream to load using the LoadMoivie method. However, if a movie is playing, and i call the LoadMovie method a second or more time, It errors out giving me a built in error dialog about mal-formed XML… any help would be greatly apprecieated!

    • Dremation says:

      try loading a null value first. LoadMovie(0,”"); then try loading the url/file. If this doesn’t work try creating the control programmatically and use the dispose method when done with one stream.

  2. carl5121 says:

    I’m using visual studio 2008, I have Abode flashplayer installed but I can’t seem to find the shockwave flash object control in visual studio. Any ideas why?

  3. Lynn Briner says:

    I am having the ame problem that can’t get the shockwave object to show up in the tool bar.

  4. Espeon says:

    try to click choose items in my vb2008 and then my vb2008 just flashes and wont do anything -.-

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>