I got some more problems to play flash. Maybe this is not the right place to ask. But I'm using wxWidgets and I don't know whether other forum provide help or not. So I post my question here.
Inside flash9b.tlh file, the event declaration is like:
Code: Select all
struct __declspec(uuid("d27cdb6d-ae6d-11cf-96b8-444553540000"))
_IShockwaveFlashEvents : IDispatch
{
//
// Wrapper methods for error-handling
//
// Methods:
HRESULT OnReadyStateChange (
long newState );
HRESULT OnProgress (
long percentDone );
HRESULT FSCommand (
_bstr_t command,
_bstr_t args );
HRESULT FlashCall (
_bstr_t request );
};
In my program:
Code: Select all
BEGIN_EVENT_TABLE(testflashPanel, MainPanel)
EVT_ACTIVEX(ID_FLASH_WIN, "OnReadyStateChange", testflashPanel::onReadyStateChange)
EVT_ACTIVEX(ID_FLASH_WIN, "FSCommand", testflashPanel::onFSCommand)
END_EVENT_TABLE()
The first event is captured in my program without any problem. But I can't capthure "FSCommand" event although the ActionScript sending "FSCommand" is correct. Furthermore I found the buttons in flash doesn't work either. I guess this maybe the cause I can't capture "FSCommand" event. If I open the flash with wxIEHtmlWin, it seems the flash works properly. All the buttons response correctly. I don't know what I missed in my coding. Here is the code to load and play the flash.
Code: Select all
void wxFlashWin::loadFlash(const wxString& file,bool loop)
{
VARIANT_BOOL b = loop?VARIANT_TRUE:VARIANT_FALSE;
m_flashInterface->put_Loop(b);
m_flashInterface->put_Movie((BSTR)(const wchar_t *)file.wc_str(wxConvLocal));
m_flashInterface->Play();
}
Can anybody advise?
Thanks[/code]