I am working on a shockwave player in my VB app. It draws its source from an XML file stored locally. I use a directory and file list box to find the flv file that plays in the shockwave movie. I need a way to refresh the shockwave component so when I click on a new flv file that file plays. This is my code sofar.

Is there away to refresh the sockwave?

VB Code:
  1. Option Explicit
  2. 'makes it necessary to specify variables
  3. 'and makes sure no variable used twice
  4.  
  5. Private Function CreateDOM()
  6.     Dim dom
  7.     Set dom = New DOMDocument30
  8.     dom.async = False
  9.     dom.validateOnParse = False
  10.     dom.resolveExternals = False
  11.     dom.preserveWhiteSpace = True
  12.     Set CreateDOM = dom
  13. End Function
  14.  
  15. Private Sub File1_Click()
  16.  
  17.     Dim dom, node, frag, cd, attr
  18.     On Error GoTo ErrorHandler
  19.     Set dom = CreateDOM
  20.    
  21.     ' Create a processing instruction targeted for xml.
  22.     Set node = dom.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'")
  23.     dom.appendChild node
  24.     Set node = Nothing
  25.    
  26.     ' Create a comment for the document.
  27.     Set node = dom.createComment("sample xml file created using XML DOM object.")
  28.     dom.appendChild node
  29.     Set node = Nothing
  30.    
  31.     ' Create the root element.
  32.     Dim root
  33.     Set root = dom.createElement("videos")
  34.    
  35.     ' Add the root element to the DOM instance.
  36.     dom.appendChild root
  37.     ' Insert a newline + tab.
  38.     root.appendChild dom.createTextNode(vbNewLine + vbTab)
  39.     ' Create and add more nodes to the root element just created.
  40.     ' Create a text element.
  41.     Set node = dom.createElement("video")
  42.     'node.Text = "some character data"
  43.     node.Text = File1.FileName
  44.     ' Add text node to the root element.
  45.     root.appendChild node
  46.     Set node = Nothing
  47.       ' Add a newline plus tab.
  48.     root.appendChild dom.createTextNode(vbNewLine + vbTab)
  49.    
  50.     ' Save the XML document to a file.
  51.     dom.save App.Path + "\flv.xml"
  52.     Set root = Nothing
  53.     Set dom = Nothing
  54.     Exit Sub
  55.    
  56.    
  57. ErrorHandler:
  58.     MsgBox Err.Description
  59. End Sub
  60.  
  61. Private Sub Form_Load()
  62.     'play shockwav movie
  63.     ShockwaveFlash1.Movie = App.Path & "\XML_FLV_player.swf"
  64. End Sub
  65.  
  66. 'search for flv file
  67. Private Sub Drive1_Change()
  68.     Dir1.Path = Drive1.Drive
  69. End Sub
  70.  
  71. Private Sub Dir1_Change()
  72.     File1.Path = Dir1.Path
  73.     File1.Pattern = "*.flv"
  74.  
  75. End Sub