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

GotoFrame

Description

Activates the frame number specified by FrameNum in the current movie. If the data for a requested frame is not yet available, the player goes to the last frame available and stops, causing unexpected results during playback. The argument FrameNumber is zero-based; that is, frameNumber is 0 in the first frame of the movie, 1 for the second frame, and so on. This differs from the Goto action within Flash, which begins at 1.

Message

FPCM_GOTOFRAME

Structure

struct SFPCGotoFrame
{    
     // [in]
     long FrameNum;

     // [out]
     HRESULT hr;
};

Example

void InvokeGotoFrame(HWND hwndFlashPlayerControl, long FrameNum)
{
     SFPCGotoFrame info;

     info.FrameNum = FrameNum;

     ::SendMessage(hwndFlashPlayerControl, FPCM_GOTOFRAME, 0, (LPARAM)&info);
    
     if FAILED(info.hr)
          // Error
     {
          // ...
     }
     else
          // 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.