Flex and C# Communication (Tutorial)

While waiting for Apollo i decided to check out what can be done with flash on the desktop today.
I`ve never been into microsoft programming but found out that it`s extremely easy to write your own wrapper for swf files in c#.
This gives you the opportunity to write your own Zinc like projector tool. As a start i implemented simple file I/O and a way to start and play cds.
The coolest thing i was able to do was to include microsofts speech recognition and make my flex application react to speech.
The app is quite simple but cool! I have a button on stage and if i say “left” it will jump to the left or if i say “green” it`s text becomes green.

I decided to write a small tutorial about how to embed an swf file into a c# project and how the communication works. Well this is my first public
tutorial so be patient. I had several dificulties:

– english is not my native language
– how to describe things and make them understandable
– how to show code in a nice way

Well i think i failed in coping with all of those challenges :-(

Anyway if i find the time i want to extend this article to the point with the speech engine.
If you want to help me i would be very interested in suggestions and corrections.

Check it out here.

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest

23 thoughts on “Flex and C# Communication (Tutorial)

  1. Excellent tutorial! Thanks for sharing. I wish more folks would share Flex .NET articles.

  2. That was excellent!! But i had problems on that, I installed the .dll but it’s still giving me the same error message!!! Please can you help me?? Thanks..

  3. Hi!! Admin,

    I placed the dll’s in my project directory, as your article said. I think it’s correct, so in the VStudio I can see the shockwave object, but when I try to put it on a winform I have the error message we talk about.

    Thanks for your interest!!!

    Dan.

  4. Excellent work. But when I created the application the memory started increasing gradually without coming down. I thinks it is a meory leak. Can u help me sort this problem..

  5. Okay

    I have a good question here, how do I call a C# com plus application from flex?

    Hank

  6. I have the same question as hank… thats what i was actually googling and found this page…?

    Im sure one else is also going to be googling it in the future…

    So.. anyone have a clue?

    Thanks
    Mike Koenig

  7. May be long time to comment .But I confirm you article is useful for me.Thanks it make some idea to me.I don’t know about flex more.but I try to know that.
    Thanks

  8. Very nice tutorial, explained well. I have been developing Flex and AIR applications and have been longing for a way to call out to C# or COM components for a while.

    Now … if there was just a way to call a C# or COM component from a Flex AIR application, I would really be excited! I am disappointed at the lack of interaction with the local system that Flex AIR allows. General file access is great, but I wish you could launch other processes and call other components. Maybe in a future release.

  9. I clicked the “Check it out here.”. It gives me 404 error. Was the article removed from this site ?

    Thanks

  10. Not able to check out the link given above(Check it out here.
    This is the first time i am looking at flex and i am more interested to carry forward on the communication between flex & C#

    Please guide me through.

    Regards,
    Thakur

  11. Hi,

    This is my first interaction with flex.
    Can i use flex to carry out memory dump of flash application without using ShockwaveFlash COM object?

    Thanks.

  12. The link is not working. I’d be much much greatfull if you can publish again. Or if it’s hard work plz send me a mail.(hkthilina@gmail.com)

Leave a Reply

Your email address will not be published. Required fields are marked *