1

Here I have played swf in wpf web browser control. I just want to know how to get total frame and current frame of a swf when playing in web browser. The following code below is used to find these counts when using shockwaveflash object.

int fn = axShockwaveFlash1.TotalFrames;
int cf = axShockwaveFlash1.CurrentFrame();

and following code is used to play swf in web browser.

this.MainBrowser.Navigate(@"C:\Users\Admin\Desktop\car.swf");

Instead of these shown code, what should we use for web browser and c#.

VC.One
  • 14,790
  • 4
  • 25
  • 57
  • I already told you use External Interface option of AS3 when making your SWF. You add a function in the SWF that gives out a number of current frame and then from C# you query that SWF function to get a number. If you didn't make your SWF to do that, then you cannot get the info... Also your last sentence is confusing, _".. what we have in..."_ is same as saying _"THAT which we already have in"_ so what does that mean exactly? – VC.One May 30 '16 at 12:01
  • In short.. if a browser is involved then External Interface must be used... You create an HTML & embed the SWF in there, then run HTML file via browser and communicate between JS (browser) and AS3 (SWF) functions. – VC.One May 30 '16 at 13:49
  • @VC.One,yeah I have embeded the swf with html then called through web browser,its working finely.From here how can I get the frame count and current frame.May I know the code which will used to find the frame count .Is there any website we have to refer? – chinnathambi r May 31 '16 at 05:06

0 Answers0