FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

TotalFrames

Description

Returns the total number of frames in the movie. This is not available until the movie has loaded. Wait for ReadyState = 4.

Message

FPCM_GET_TOTALFRAMES

Structure

struct SFPCGetTotalFrames
{    
     // [out]
     long TotalFrames;

     // [out]
     HRESULT hr;
};

Example

void GetTotalFrames(HWND hwndFlashPlayerControl)
{
     SFPCGetTotalFrames info;

     ::SendMessage(hwndFlashPlayerControl, FPCM_GET_TOTALFRAMES, 0, (LPARAM)&info);
    
     if FAILED(info.hr)
          // Error
     {
          // ...
     }
     else
          // OK
     {
          TCHAR lpszBuffer[1024];

          wsprintf(lpszBuffer, _T("%d"), info.TotalFrames);

          ::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
     }
}

Flash versions

5: supported
6: supported
7: supported


Copyright © 2004 Softanics. All rights reserved.
Delphi is a trademark of Borland Software Corporation.
Macromedia and Shockwave Flash are trademarks of Macromedia, Inc.