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

TCurrentFrame

Description

Returns the number of the current frame for the timeline specified by target. The frame number returned is zero-based, meaning frame 1 of the Flash movie would be 0, frame 2 would be 1, and so on. The argument type is string.

Message

FPCM_TCURRENTFRAME

Structure

struct SFPCTCurrentFrame
{    
     // [in]
     struct
     {
          LPCTSTR lpszBuffer;

     } target;


     // [out]
     long Result;

     // [out]
     HRESULT hr;
};

Example

void InvokeTCurrentFrame(HWND hwndFlashPlayerControl, LPCTSTR target)
{
     SFPCTCurrentFrame info;

     info.target.lpszBuffer = target;

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

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

          ::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.