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

Movie

Description

The URL or file name source for the Flash Player movie file. Setting this will load a new movie into the control. Notes. 1. Control does not check up the movie changes after loading, so re-loading with the same name is impossible. You should change the movie name or load an empty blank previously. 2. Empty file name raises an exception error.

Messages

FPCM_GET_MOVIE
FPCM_PUT_MOVIE

Structures

struct SFPCGetMovie
{    
     // [in, out]
     LPTSTR lpszBuffer;
     DWORD dwBufferSize;
     // [out]
     HRESULT hr;
};

struct SFPCPutMovie
{    
     // [in]
     LPCTSTR lpszBuffer;
     // [out]
     HRESULT hr;
};

Example

void GetMovie(HWND hwndFlashPlayerControl)
{
     SFPCGetMovie info;

     info.lpszBuffer = NULL;

     ::SendMessage(hwndFlashPlayerControl, FPCM_GET_MOVIE, 0, (LPARAM)&info);

     if FAILED(info.hr)
          // Error
     {
          return;
     }

     info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

     ::SendMessage(hwndFlashPlayerControl, FPCM_GET_MOVIE, 0, (LPARAM)&info);
    
     if FAILED(info.hr)
          // Error
     {
          // ...
     }
     else
          // OK
     {
          ::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
     }

     LocalFree((HLOCAL)info.lpszBuffer);
}

void PutMovie(HWND hwndFlashPlayerControl, LPCTSTR Movie)
{
     SFPCPutMovie info;

     info.lpszBuffer = Movie;

     ::SendMessage(hwndFlashPlayerControl, FPCM_PUT_MOVIE, 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.