Hi,
I want open a *.swf in CCoeControl, could *.swf only play in a specify rect, just looks like it embedded in the windows
Thank you!
Hi,
I want open a *.swf in CCoeControl, could *.swf only play in a specify rect, just looks like it embedded in the windows
Thank you!
Might not be possible with APIs available at this time with symbian.
Note: Donot muti-post.
I met the same question and I think there should be a corresponding API to solve this issue. Does any one know?
There are some articles on wiki using DocumentHandler. But it's not play the swf on a specified rect. It's more proper to use it playing the starting movie of an application.
Flash content can only be played:
- in the Flash player (see Document Handler)
- in browser through the Flash plug-in
- as a standalone application (see Flash Viewer Framework API)
It cannot be played in a UI component.
-- Lucian
I've found one way to solve the problem.
In this way, we can play .swf inside the app rather than play it in FlashPlayer. But it's full screen and I didn't find a way to resize the swf.
here is the code.
class CSwfPlayer : public CBase,MAknServerAppExitObserver
{......}
void CSwfPlayer::ConstructL()
{
CEikProcess* iProc;
iProc = CEikonEnv::Static()->Process();
iDocHandler = CDocumentHandler::NewL(iProc);
}
void CSwfPlayer::PlaySwf()
{
TThreadId id;
RApaLsSession ls;
User::LeaveIfError(ls.Connect());
CleanupClosePushL(ls);
//this is the private directory of your application
TFileName fileName(KLitSwfFileToLaunch);
RFs aFs;
User::LeaveIfError(aFs.Connect());
CleanupClosePushL(aFs);
User::LeaveIfError(aFs.ShareProtected());
RFile flashFile;
User::LeaveIfError(flashFile.Open(aFs,fileName,EFileShareReadersOrWriters ));
CleanupClosePushL(flashFile);
iDocHandler->SetExitObserver(this);
TDataType d_Type;
TInt err = iDocHandler->OpenFileEmbeddedL(flashFile,d_Type);
// TInt succ = ls.StartDocument(flashFile,id,NULL);
CleanupStack::PopAndDestroy(3);
aFs.Close();
flashFile.Close();
}
void CHelloWorldBasicAppUi::HandleServerAppExit(TInt /* aReason*/)
{
Exit();
}
That's exactly what the Document Handler does, you've just re-discovered the wheel. :)
-- Lucian