A Flash Developer Resource Site

Results 1 to 16 of 16

Thread: Flash GUI in .NET application

  1. #1
    Senior Member sprout74's Avatar
    Join Date
    Oct 2000
    Posts
    134

    Flash GUI in .NET application

    Q:
    Can Flash MX 2004 be used as the GUI for an application (desktop software, not web based) written for the .NET framework?

    I want to author an application that would be perfect for flash as a the GUI, but it would need to be able to support a pretty full API for Flash and the wrapper application, written in c#, as they would be passing a lot of data between eachother, as well as getting and sending data over the web.

    So, can Flash be used in .NET? What kind of API does it have? Or am I stuck with the Windows look/feek

    thanks,

    sprout
    "If the implementation is hard to explain, it's a bad idea.
    If the implementation is easy to explain, it may be a good idea."
    from The Zen of Python (by Tim Peters)

  2. #2
    Member
    Join Date
    Oct 2003
    Posts
    35
    This paper outlines the "how to" using the flash ocx

    http://www.macromedia.com/devnet/mx/...s/flash_vb.pdf

  3. #3
    Senior Member sprout74's Avatar
    Join Date
    Oct 2000
    Posts
    134

    Thanks

    Thanks for the response, will look into it and keep those interested on any progress I make by posting here.

    Cheers,

    sprout
    "If the implementation is hard to explain, it's a bad idea.
    If the implementation is easy to explain, it may be a good idea."
    from The Zen of Python (by Tim Peters)

  4. #4
    Senior Member sprout74's Avatar
    Join Date
    Oct 2000
    Posts
    134

    on MM's site

    I found this link on MM's site:
    http://www.macromedia.com/devnet/mx/...k_history.html

    Its an article about c#/Visual Studio/Flash COM.
    "If the implementation is hard to explain, it's a bad idea.
    If the implementation is easy to explain, it may be a good idea."
    from The Zen of Python (by Tim Peters)

  5. #5
    Grandmaster Flash
    Join Date
    Apr 2004
    Location
    Edinburgh, Scotland
    Posts
    139
    This is really cool stuff.

    I havent used VB6, but am using C# .NET and VS.NET to build all of my websites. I am however interested in creating a Flash/.NET application for a specific project. Can anyone point me in the direction of similar, or updated (to .NET) version of the 2 articles mentioned in this thread?

    I'd be really interested. I'm sure you can use the Flash.ocx object in .NET, but I'd imagine that there is a more elegant (efficient?) way in .NET.

    Thanks in advance

  6. #6
    Senior Member sprout74's Avatar
    Join Date
    Oct 2000
    Posts
    134
    afraid there aint much out there...

    There are some books on FlashMX and ASP.NET integration on Amazon, but it seems that GUI development is still being done using .NET's native components.
    "If the implementation is hard to explain, it's a bad idea.
    If the implementation is easy to explain, it may be a good idea."
    from The Zen of Python (by Tim Peters)

  7. #7
    Grandmaster Flash
    Join Date
    Apr 2004
    Location
    Edinburgh, Scotland
    Posts
    139
    Thanks for the reply.

    I'm definately going to persue this and I'll post a reply for all to see if I make any good discoveries. The GUI stuff that .NET can do is pretty good, but lets face it doing slick fades and tweens that will work cross-browser with DHTML is going to be a lot harder than with Flash!

  8. #8
    Senior Member sprout74's Avatar
    Join Date
    Oct 2000
    Posts
    134
    yeah, we are developing a web application at work that uses flash for a part of the gui.

    We are just discovering that it is not all roses, as there are limitations to flash (like saving state, Component APIs).
    "If the implementation is hard to explain, it's a bad idea.
    If the implementation is easy to explain, it may be a good idea."
    from The Zen of Python (by Tim Peters)

  9. #9
    Grandmaster Flash
    Join Date
    Apr 2004
    Location
    Edinburgh, Scotland
    Posts
    139
    Hi Sprout,

    I am just getting back onto this again. I have built most of the Flash app that I need, and am now looking to incorporate this into a simple .NET application. All I need the app to do is to play the .swf (via the Flash.ocx) and load and save XML files to and from the local disk.

    I haven't ever done this before, so excuse my ignorance. I am using VS 2002 .NET, have created a basic CS windows application project, and also have placed the Flash OCX on the default Form (Form1.cs).

    I am stuck with 2 things:

    1 - I need to reference the movie - (called fstest.swf, in same directory as app). I believe I need to set the 'movie' property on the .ocx control, but this doesn't load the movie.

    2 - I need to know where to place the event handlers in my .NET app to catch 2 FSCommands.

    I hope you, or anyone can help - I have a presentation on Thursday....


    Thanks in advance
    If it ain't broke, don't fix it.

  10. #10
    Senior Member sprout74's Avatar
    Join Date
    Oct 2000
    Posts
    134
    nice work!

    We have put that project on hold here, so I have not done any development on this.

    If you would like help, and feel like showing the world what you have done, you could post your work?

    I would be glad to have a go at it, but can not garentee the time I could commit to it.

    But nice work!!

    sprout
    "If the implementation is hard to explain, it's a bad idea.
    If the implementation is easy to explain, it may be a good idea."
    from The Zen of Python (by Tim Peters)

  11. #11
    Grandmaster Flash
    Join Date
    Apr 2004
    Location
    Edinburgh, Scotland
    Posts
    139
    Hi Sprout,

    Thanks for your reply. Unfortunately the project I am doing is for work, so I can't really distribute it.

    Anyhow, I have managed to get the 'mother' app working (C#, Visual Studio 2002), and FSCommands are being picked up, complete with arguments in it.

    The link that helped is here: http://www.vbpc.de/members/aw/tut2/

    It's in German, and also in VB, but it helped me out, even though I can't speak/read German!

    Cheers
    GW
    If it ain't broke, don't fix it.

  12. #12
    Grandmaster Flash
    Join Date
    Apr 2004
    Location
    Edinburgh, Scotland
    Posts
    139
    Oh dear (for want of a stronger word!!)

    I have just tried adding my proper .swf file to the .NET app. - before I was using a simple test .swf, with 2 buttons, and I got the functionality working with that.

    Looks like I celebrated too early...

    The difference between my real .swf and the test .swf is that the real .swf has many external files. When I load the .NET exe with the real (final) .swf none of the external files load into it!!!! When I load the .swf in Flash player, everything loads as expected.

    I assume that this may be a security 'feature' of either flash and/or .NET, but I don't know.

    Sprout - have you had this problem before? Do you know a workaround?

    Thanks in advance
    If it ain't broke, don't fix it.

  13. #13
    Senior Member sprout74's Avatar
    Join Date
    Oct 2000
    Posts
    134
    i have no idea, but things i would try:

    as the application is going to be standalone, then perhaps there is no need to load external SWFs. Mabey you need to re-build the final movie to include the external SWFs as part of the main movies internal library.

    That way there is no need to try and figure out paths, and you can just export them for actionscript to use.

    If you do not want to do that, then perhaps the .NET application can pass the absolute path to the flash movie, so that it can use that together with the name of your external SWF, and depending on your file structure, any other directories where the external media lives.

    hope that helps and thanks for link.

    let me know, if you are allowed, how it goes.

    sprout
    "If the implementation is hard to explain, it's a bad idea.
    If the implementation is easy to explain, it may be a good idea."
    from The Zen of Python (by Tim Peters)

  14. #14
    Grandmaster Flash
    Join Date
    Apr 2004
    Location
    Edinburgh, Scotland
    Posts
    139
    Hi Sprout,

    I have tried specifying absolute paths in my flash movie. I have found that the format:

    C:/test/flash/presenter.swf

    (incidentally the format C:\test\flash\presenter.swf doesnt work)

    works when I specify it in the .swf file. I have updated all my references in the .swf to this format, and it now works as expected.

    Thanks for your quick response. I will try and post a wee demo when I get a mo tomorrow (C# source, and a test .fla file).

    All the best
    If it ain't broke, don't fix it.

  15. #15
    Senior Member sprout74's Avatar
    Join Date
    Oct 2000
    Posts
    134
    Ta for the demo.

    But don't get in trouble with the boss over this if you are worried about giving away the secrets of the temple.

    but a I wouldn't say no to a demo....
    "If the implementation is hard to explain, it's a bad idea.
    If the implementation is easy to explain, it may be a good idea."
    from The Zen of Python (by Tim Peters)

  16. #16
    Junior Member
    Join Date
    Nov 2005
    Posts
    1

    flash GUI in .NET application

    Hi,

    i am also intersted to build a GUI in flash for a .NET app in C#.
    Has someone managed to do it?
    i read this tutorial:
    http://www.dmxzone.com/ShowDetail.asp?NewsId=10728
    which explain how to do it in vb.net.
    It says it is not cross platform. Is it also right about an app. written in C#?
    And it also says it might not be able to fit future versions of Flash.
    Anyway if someone has made any progress please help me with that.

    10x

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center