FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties
Description
Ability to perform outbound scripting from within a SWF. Outbound scripting is achieved through use of FSCommand actions or getURL actions that specify a scripting statement. 'never' - outbound scripting always fails; 'always' - outbound scripting always succeeds.
Messages
FPCM_GET_ALLOWSCRIPTACCESS
FPCM_PUT_ALLOWSCRIPTACCESS |
Structures
struct SFPCGetAllowScriptAccess
{
LPTSTR lpszBuffer;
DWORD dwBufferSize;
HRESULT hr;
};
struct SFPCPutAllowScriptAccess
{
LPCTSTR lpszBuffer;
HRESULT hr;
};
|
Example
void GetAllowScriptAccess(HWND hwndFlashPlayerControl)
{
SFPCGetAllowScriptAccess info;
info.lpszBuffer = NULL;
::SendMessage(hwndFlashPlayerControl, FPCM_GET_ALLOWSCRIPTACCESS, 0, (LPARAM)&info);
if FAILED(info.hr)
{
return;
}
info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));
::SendMessage(hwndFlashPlayerControl, FPCM_GET_ALLOWSCRIPTACCESS, 0, (LPARAM)&info);
if FAILED(info.hr)
{
}
else
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}
LocalFree((HLOCAL)info.lpszBuffer);
}
void PutAllowScriptAccess(HWND hwndFlashPlayerControl, LPCTSTR AllowScriptAccess)
{
SFPCPutAllowScriptAccess info;
info.lpszBuffer = AllowScriptAccess;
::SendMessage(hwndFlashPlayerControl, FPCM_PUT_ALLOWSCRIPTACCESS, 0, (LPARAM)&info);
if FAILED(info.hr)
{
}
else
{
}
}
|
Flash versions
5: not supported
6: not 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.
|