F-IN-BOX DLL Edition Help >> Native Flash ActiveX Interface >> Events

OnReadyStateChange

Description

Generated when the ready state of the control changes. The possible states are 0=Loading, 1=Uninitialized, 2=Loaded, 3=Interactive, 4=Complete.

Example

[ C++ ]
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
...
    case WM_NOTIFY:
    {
        NMHDR* pNMHDR = (NMHDR*)lParam;

        if (hwndFlashPlayerControl == pNMHDR->hwndFrom)
        {
            switch (pNMHDR->code)
            {
                case FPCN_ONREADYSTATECHANGE:
                {
                    SFPCOnReadyStateChangeInfoStruct* pInfo = (SFPCOnReadyStateChangeInfoStruct*)lParam;

                    TCHAR lpszBuffer[1024];
                    _sntprintf(lpszBuffer, sizeof(lpszBuffer) - 1, _T("newState: %d"), pInfo->newState);

                    MessageBox(hWnd, lpszBuffer, _T("OnReadyStateChange()"), MB_OK | MB_ICONINFORMATION);

                    break;
                }
            }
        }
    }
}

Flash versions

All versions are supported



Copyright © Softanics. All rights reserved.
F-IN-BOX is a trademark of Softanics.
Macromedia and Shockwave Flash are trademarks of Adobe