Hi

I am developing a window based application in C#.net. In this app i have to sync between flash and c#. For this i have added Shockwaveflashobjects.dll from com component.

I got idea of this via this topic
http://www.codeproject.com/KB/audio-video/flashexternalapi.aspx

Now when i am make a call from c# to flash it gives me error like this

Error HRESULT E_FAIL has been returned from a call to a COM component.

Is there any solution for this error ????

Thanks in advance

Tejal.

yes i want to play swf from c# and also i want to sync between flash and c# like i can call a function of c# from flash and viceversa
so when i am calling flash function from c# it gives me error

Error HRESULT E_FAIL has been returned from a call to a COM component.

do you now about this problem??

Use Shockwave Flash Object.
Right Click on control toolbar -> Add/Remove Item -> Select for Com Components Tab then chose for Shockwave flash object.
it will shown on your control toolbar (last control), use it like others control and add this following code (i also use open dialog control)
This following code will play .swf file :

private void button1_Click(object sender, System.EventArgs e)
{
	openFileDialog1.Filter = "swf File|*.swf";
	openFileDialog1.FilterIndex = 2;
	if (openFileDialog1.ShowDialog() == DialogResult.OK)
	{
		axShockwaveFlash1.Stop();
		axShockwaveFlash1.Movie = openFileDialog1.FileName;
		axShockwaveFlash1.Play();
		//lblFilePath.Text = openFileDialog1.FileName;
	}
}
This article has been dead for over six months. Start a new discussion instead.