Flabulator – flash widgets application in .Net

Filed under: Flash, MS .NET — Wrote by Campbell on Tuesday, September 6th, 2005 @ 12:03 am

Just a small update. I have added draging and resizing to the widgets. Im still having major issues with transparency so I might be stuck with square borders *sigh* windows and its non-conformity. If I get really enthused I will write a custom painter but man thats pretty hard out. In the image below you might be able to see the six little white boxes on the (black swf) gproject advertisment. These are for resizing and you can also drag the swf round the screen. Hit F6 and they all disapear down to an Icon in the taskbar. Next up tomorow night is to add the balloon notifyer interface for flash which will popup messages from the icon in the taskbar.

 The memory usage is looking like it will be a problem with too many widgets….but I will try using the flash 8 player and see how we go with the improvements they have made. 

You can also just see Ive added a "powered by Macromedia" logo in the background (hope you dont mind guys) which is a configureable image anlong with the background color/gradient in the xml. Any Comments and feature requests welcome guys!!!!

Ive had a couple of inquires about this and just to reasure everyone it will be completely free for non comercial use. Im just worried if I did sell it I would have to support it. This brings me to an interesting article I read on someones blog about the sustainability of small opensource projects. I think the best way to keep this alive once I have finished is to post it as a Tutorial for flash and .Net intergration. Especially seeing I will be using the new ExternalInterface class of flash 8. Im just worried that some of the c# stuff (although  not really advanced) might scare off some people.

11 Comments   -
  • Comment by Jer | September 6, 2005 @ 5:13 am

    I’ve got a class in .Net that allows you to use WS_EX_LAYERED transparency using PNG files in C# if you’re interested. I found it a few years ago on the net somewhere and adapted it for my uses. Lemme know if you want it.

  • Comment by Campbell | September 6, 2005 @ 8:51 am

    That would be cool thanks Jet, I really didnt want to go through the custom painter route…Im pretty sure I should be able to use the alpha channel information in the activex container

  • [...] So onto Flabulator.  Its my c# implementation of flash widgets. After failingto find an answer to the flash transperancy issue I pressed on and got a working alpha. The next major issue I have hit is managing the dragging of the widgets. For the alpha I just had a black border upon focus with resize handels to drag and resize, but this wasn’t ideal. In other similar applications you might notice what a couple have name the dragger. A small icon in the top corner allowing dragging of the widget. I would really like to steer away from this in the Flabulator. The problem stems from the fact that as soon as the flash ocx has focus you loose access to the mouse events in c#. So I released the alpha to a couple of people for comments and recieved some really encouraging ones, along with finding a few forum posts about people watching it with interest. I have someone helping on the project now (I will check with them if its ok to mention thier name) so things might move a bit more quickly. Im currently refactoring it to provide a satble base for further features. [...]

  • Comment by Memorex | December 12, 2005 @ 5:49 am

    Hi,it’s a good Job,
    but i don’t understand some thing here
    First : what is the control that used here to add Flash movie to .NET Project it is Shockwave Flash components or What ?
    second: what are you doing to make the movie trancparent “I read this topics several times and i don’t understood How?”

    Thanks

  • Comment by Campbell | December 12, 2005 @ 8:02 am

    Hey Memorex,
    1. I just used the shockwave activex control. you will have to added it to the tool bar to see it.
    2. at this point setting WMODE to transparent wont work. Im working on this though. So you basically cant do it in .net straight .net. The guys who are making screen weaver are doing it in c++ as described above. Blitting a Black background then white offscreen, measureing the diferecne then painting that bitmap on screen. This is quite reasource intensive. I am hoping the the up coming ‘ Macromedia Apollo’ project will answer this! I feel its one thing that is holding flash back in the desktop app area. email me if you have any questions. Cam.

  • Comment by Shaun | December 30, 2005 @ 4:01 am

    In reference to displaying a flash movie with transparency in a .net application, i found a way and it works. http://www.flashplayercontrol.com/dotnet/ This guy build a OCX wrapper in C++. It\’s really easy to implement there is a demo Dll to play with. It worked great for me.

  • Comment by Campbell | December 30, 2005 @ 9:00 am

    Hey Shaun, This is what I am hopin to do myself. Still learning all the nessesary c++. Basically its just not possible in .net without it. I though this control looked cool until I saw the price. Would be great for a paying projects though, just not a personal one.

  • Comment by Gavin | February 24, 2006 @ 8:23 am

    If you create a png with a transparent background color, and set all the child containers background colour to transparent ( in the web tab of the colours ), and set your form background/transparency key to magenta. then you do not need any special classes.

    I’m creating my own set of widgets for the company, and the only thing I am stuck on is making sure the widget stays on the desktop only and says visible even when the user clicks show desktop or uses the windows key + d, if you can help, let me know…

    Gav

  • Comment by K. Bharath | March 26, 2007 @ 5:28 pm

    Hi campbell,
    you said “blitting a black background, the white offscreen, measuring the difference, then painting the bitmap.” Can you explain in detail or can you provide some sample source, So that I could attempt.

    TIA,

    Regards,

    K. Bharath

  • Comment by Campbell | March 26, 2007 @ 6:16 pm

    To tell you the truth Mr Bharath I would get the dll mentioned earlier in the comments as it would be much easier. The blitting off-screen is pretty involved and resource intensive.

Leave your comment

© Flex developer, Campbell Anderson, from New Zealand – xsive blog -