×
Namespaces

Variants
Actions
Revision as of 21:37, 2 October 2007 by hartti (Talk | contribs)

Archived:How to play a SWF file from your Symbian application?

From Nokia Developer Wiki
Jump to: navigation, search


The new flashlite player in S60 3rd edition FP1 devices (e.g. 6110 or 6120) has a new feature to allow user to save the SWF in the flashlite directory upon exit. If you do not want the flashlite player to prompt user to save the SWF, you can try the method below. If you get a permission error by using the method below, you will have to reflash your device to the latest firmware. I do not have the exact version of the firmware at this moment but i will update this page again once i get the information.

CDocumentHandler* iDocHandler;
 
iDocHandler = CDocumentHandler::NewL((CEikProcess*)iEikonEnv->Process());
 
TThreadId id;
 
RApaLsSession ls;
 
User::LeaveIfError(ls.Connect());
 
CleanupClosePushL(ls);
 
_LIT(KLitSwfFileToLaunch,"C:\\private\\06fd5506\\A.swf");
//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);
 
TInt succ = ls.StartDocument(flashFile,id,NULL);
 
CleanupStack::PopAndDestroy(3);
 
aFs.Close();
 
flashFile.Close();
 
delete iDocHandler;
20 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×