读书人

用IShockwaveFlash 的stop或者stoplay

发布时间: 2012-09-11 10:49:03 作者: rapoo

用IShockwaveFlash 的stop或者stoplay都无法停止flash
用IShockwaveFlash 的stop或者stoplay都无法停止flash,为什么啊!有的flash是可以停止,但有的不能停!我是用c++调用IShockwaveFlash 组件的:
IShockwaveFlash* spObject =NULL;
HRESULT hr = disp->QueryInterface(__uuidof(IShockwaveFlash), (void **) &spObject);
if (spObject != NULL)
{
strTemp.Format(_T("IShockwaveFlash Function Error : spObject = %p"),spObject);
OutputDebugString(strTemp);
}
if (SUCCEEDED (hr) || spObject != NULL)
{
strTemp.Format(_T("IShockwaveFlash Function Error : %X"),hr);
OutputDebugString(strTemp);
hr = spObject->GotoFrame(1);
strTemp.Format(_T("IShockwaveFlash Function GotoFrame : %X"),hr);
OutputDebugString(strTemp);
hr = spObject->StopPlay();
strTemp.Format(_T("IShockwaveFlash Function StopPlay : %X"),hr);
OutputDebugString(strTemp);
hr = spObject->Stop();
strTemp.Format(_T("IShockwaveFlash Function Stop : %X"),hr);
OutputDebugString(strTemp);
hr = spObject->Back();
strTemp.Format(_T("IShockwaveFlash Function Back : %X"),hr);
OutputDebugString(strTemp);
VARIANT_BOOL checkflash;
hr = spObject->IsPlaying(&checkflash);
strTemp.Format(_T("IShockwaveFlash Function IsPlaying : %X"),checkflash);
OutputDebugString(strTemp);
hr = spObject->GotoFrame(1);
strTemp.Format(_T("IShockwaveFlash Function GotoFrame : %X"),hr);
OutputDebugString(strTemp);

return S_OK;

[解决办法]
c++是否真正执行了flash帧脚本的stop()命令?
[解决办法]
确认你得在加载swf文件后stop

读书人网 >VC/MFC

热点推荐