Using the control you can load any flash movie from memory directly.
Just use the
FPCM_LOADMOVIEFROMMEMORY
and
FPCM_PUTMOVIEFROMMEMORY
No temporary files!
Load any movie on-the-fly from any supported source. For example,
you can put one or more flash movies in the resource section of your
application and then load it from the exe! That's the portability and
power of FlashPlayerControl!
Here's an example of how to load a flash movie from a resource:
#include "FlashPlayerControl.h"
if (!RegisterFlashWindowClass ())
return;
hwndFlashPlayerControl =
CreateWindow(WC_FLASH,
NULL,
WS_CHILD | WS_VISIBLE,
rc.left,
rc.top,
rc.right - rc.left,
rc.bottom - rc.top,
m_hWnd,
NULL,
hInstance,
NULL);
HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, _T("EmbeddedMovie"), _T("FLASH"));
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID lpMovieData = LockResource(hResData);
DWORD dwMovieSize = SizeofResource(hModule, hResInfo);
SFPCPutMovieFromMemory sFPCPutMovieFromMemory;
sFPCPutMovieFromMemory.lpData = lpMovieData;
sFPCPutMovieFromMemory.dwSize = dwMovieSize;
::SendMessage(m_hwndFlashPlayerControl, FPCM_PUTMOVIEFROMMEMORY , 0, (LPARAM)&sFPCPutMovieFromMemory);
|