If you dispose of an object on a button click can you also create the object on a button click?
axShockwaveFlash1.dispose
How would I create the flash object again?
Printable View
If you dispose of an object on a button click can you also create the object on a button click?
axShockwaveFlash1.dispose
How would I create the flash object again?
axShockwaveFlash1 = new <Object Name>
This begs the question, if you want to use an object of that type then why are you disposing one that you already have? To dispose an Image in a PictureBox becuase you're displaying a different one is one thing, but what can this new object do that the existing one can't? In the case of an ActiveX Shockwave player you would simply change the path to the animation it was displaying wouldn't you?
Well one reason I can think of is you can't reload a shockwave component. My shockwave component plays the same swf, but that swf is playing different movies depending on a user selection. Initially the component plays fine but if a new selection is made and a new movie is choosen the swf doesnt update. It will only play the new selection if you restart the application.
So I thought, if I remove the component and make it again it would always play the new selection. Maybe there is another way.
See my other thread related to this object http://www.vbforums.com/showthread.php?t=408731