Embedding Flash Player in Windows Applications using C#

The Macromedia DevNet center has just published an article I wrote that discusses embedding the Flash player within Windows applications using C#.

The article is based on the Stock Charting Windows application which is included on DRK 4. The application uses the line chart component from the Flash Charting Component Set 2 to chart historical stock data within the windows app.

You can read the entire article here.

Comments

  1. July 29, 2003 11:08 PM
    Mike, Great article! What an excellent resource and tutorial for folks interested in embedding the Flash player within a windows app. I have had a lot of success embedding the player within Visual Basic apps. Now I am excited to start working with .NET as well. Keep up the great work! And congrats on getting DRK4 out the door, looks like quite a collection! Rob
  2. Ahmet Zorlu
    July 30, 2003 4:36 AM
    Thank you for the article, Just a theoretical question. Instead of passing data to the player as String, would it be ideal to pass data as an AMF package (e.g. using classes in System.Runtime.Serialization namespace). For example a DataSet can be passed to the interpreter and it can be deserialized as native ActionScript datatypes. Would this be possible without making use of the proxy used in Remoting for .NET?
  3. Jon Bradley
    July 30, 2003 10:12 AM
    Hey Mike, Great article! Now ... all we need is someone to show us how to embed Flash into an OS X application using Objective C and Project Builder (or X Code when it comes out for Panther). cheers, Jon
  4. mike chambers
    July 30, 2003 11:09 AM
    >Instead of passing data to the player as String, would it be ideal to pass data as an AMF package That is a good question. The only way that I think this would be possible is the have the windows app and flash movie talk to each other via Flash Remoting. Even then, yo uwuold have to figure out how to use the Flash Remoting server side DLL in your code. (which is not document). It is also a potential secruity issue as your app essentially becomes a web server. However, that does not mean it is not possible in a better way, but I just dont know. hope that helps... mike chambers mesh@macromedia.com
  5. Paul
    July 30, 2003 12:06 PM
    Thanks for the article. Good stuff! How about passing data from Flash to C#? FSCommand? ...or are there cleaner ways of doing it?
  6. mike chambers
    July 30, 2003 12:16 PM
    Yes. You would use FSCommand, which would then trigger an event in C#. It is not that difficult, and perhaps if i have time, I will write another article on it, or post some info on my weblog. mike chambers mesh@macromedia.com
  7. Mark
    July 31, 2003 5:08 AM
    Hi mike, it is possible to Listen when the FlashPlayer Crash over the 200.000 actions ? Of I have 2000 line of code in C# , I don't would the ALL of my code was compromised by the Stupid Crash of FlashPlayer over the 200.000 actions ... Mark
  8. prabhutech
    August 11, 2003 12:30 PM
    Mike, It's good to hear that we can embedd Flashpaper into windows application. But, it's bad we can't embedd Flashpaper just into another Flash application. Is making Flashpaper as a popup from a Flash file a only way to work with another Flash application? Did we thought about it? :(
  9. ian grainger
    October 13, 2003 10:55 AM
    hi, great article! i was just wondering if anyone has any ideas about applying any of this to an ASP.NET web form as opposed to a windows form - specifically if there is some way to use ActiveXObject.SetVariable in C# as this would solve the problems i'm currently having! (javascript's .setVariable command DOES NOT WORK in an ASPX page).
  10. Don
    November 15, 2003 5:44 PM
    Hi Mike, Great article. It was all a little forign since I'm not familiar with C#, but informative nevertheless. I actually found this by searching the net for a solution to add the ActiveX Shockwave Flash Object into a C++ MFC app. Unfortunately, there's no documentation on such an animal, but I'm going to tackle this and figure it out anyway, so I'll write an article in the process. I've been thinking of a good subject to write about anyway. :) I'm developing an RSS News Aggregator and after a lot of investigation, it appears that Flash is the best solution for the News Ticker, as it has a nice smooth scrolling appearance and requires minimal system resources. The movie and all of the RSS/XML stuff's done and it plays fine on my dialog, but I have one little problem. I'm hoping you or someone else reading this can help. I need the background to be transparent but if I simply change the WMode to "Transparent", the entire movie dissapears. Of course, it wouldn't be that easy. Any ideas? Or do you know where I can find some half-way decent documentation on the properties of the control? Again, thanks for the info! Don
  11. December 22, 2003 9:15 AM
    Congratulations to your fantastic Site. Thanks
  12. February 24, 2004 1:47 PM
    Thanks for the pointer! i was about to start asking questions about that.
  13. FlorinDumitrescu
    August 25, 2004 5:31 AM
    Hi Mike, I have to make a C# application which can play .swf files. The problem is I need an event to tell me when the playing of the movie is complete which the Shockwave Flash Object doesn't seem to provide. Am I missing something? Any help in this matter will be very apreciated. BTW: Great article.
  14. October 1, 2004 3:15 PM
    Mike, How can I embed a Flash Player into a C++ application? Thanks, Chuck
  15. Yomi Sunmonu
    February 17, 2005 12:32 PM
    I re-echo an earlier question, and hope you can supply me with the answer. How would you add a flash player (to play swf files) in a web app made with C# ? Thank you.
  16. mike chambers
    February 22, 2005 5:35 PM
    >I re-echo an earlier question, and hope you can supply me with the answer. How would you add a flash player (to play swf files) in a web app made with C# ? http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_4150 mike chambers mesh@macromedia.com
  17. Aashi
    March 14, 2005 2:13 AM
    Hi, I have used this setvariable function in Flash MX 2004 Pro. but it is giving problem in Flash MX :)what should I do? Is there any way to use this function which will work in Flash MX also... Thanx
  18. Aashi
    March 14, 2005 2:13 AM
    Hi Mike, I have used this setvariable function in Flash MX 2004 Pro. but it is giving problem in Flash MX :)what should I do? Is there any way to use this function which will work in Flash MX also... Thanx
  19. March 23, 2005 1:21 AM
    Does anybody have any info on the best way to detect if the user has Flash installed or not, before the flash object is loaded into the form? I'm guessing there must be some info out there on where on each OS the player is installed to, and the form could do a check to see if the file exists or not? Or is there an easier way...?
  20. Lokesh Sharma
    March 28, 2005 12:41 AM
    Great atrical, I am very much happy to use the C# with Flash. This a great exitement to me to use the C#.................
  21. Lokesh Sharma
    March 28, 2005 12:46 AM
    Great atrical, I am very much happy to use the C# with Flash. This a great exitement to me to use the C#.................
  22. Vinu
    May 6, 2005 7:43 AM
    Hi Mke, Great work!!!, I am also intreated in using C# and Flash. Please help me, how to read the srteam details of a user from Communication app inspector - Flash communication server? is it possible? regards, Vinu
  23. Dennis
    May 25, 2005 1:45 AM
    I have the same question as Aashi. What is the best way to detect if the user has Flash installed or not, before the flash object is loaded into the form? anybody can help? thx.
  24. August 22, 2005 10:52 AM
    Mike, thank you for your informative and well written article. I am developing a c# app that utilizes flash and it needs to be strongly named to support updating code that I have written (and because it is good practice). The AxShockwaveFlashInteropObjects or whatever dlls are not strongly named when generated at compile time, which throws a whole bunch of problems into my application. How would I resolve this?
  25. nirav
    March 25, 2006 2:13 AM
    connected to flash with window application
  26. dinhcuong
    June 22, 2006 1:36 AM
    i have Embedding Flash into C# is finish, but all control on Flash is not use. why ?

Post a comment




Remember Me?

(you may use HTML and Quickcode tags for style)