Questions about embedding Macromedia Flash in CF application pop up from time to time on the CF NG. In fact it is very easy to do with Flash ActiveX for Pocket PC and WebBrowser control.
Here are five steps to achieve that:
1. Download and install Flash ActiveX for Pocket PC on your Pocket PC.
2. Create Smart Device and CF v2 project in VS 2005 and drop WebBrowser on your form.
3. Add flash file (.SWF) of your choice to your project and set its Built Action to content and “Copy if newer”
4. Create html file and make sure that you have a full path to the .SWF file in the src tag value:
<html>
<head>
<title>Dogshow Game< SPAN>title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
< SPAN>head>
<body bgcolor="#FFFFFF" margintop=0 topmargin=0 leftmargin=0 marginleft=0>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="580" height="360">
<param name=movie value="dogshow.swf">
<param name=quality value=high>
<embed src="file://\Program Files\MMediaClient\dogshow.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="580" height="360">
< SPAN>embed>
< SPAN>object>
< SPAN>body>
< SPAN>html>
5. Make a call to the Navigate method with the name of your html file:
webBrowser1.Navigate(new Uri(@“file://\Program Files\MMediaClient\dogshow.htm“));
And enjoy the show: