Flash and C# interaction

  • Thread starter Thread starter vivek
  • Start date Start date
V

vivek

I am new to flash and want someone to guide me,
Is it possible to create a UI entirely in Flash and that will inetract
with C# components (backend) and these components will in return
interact with database etc.

If flash and C# interaction is possbile then, what are the prons and
cons of this interaction?

As using flash, one can create wonderful UI. But in return I also want
it to interact fully with C# components.

Thanks in adv,
-vivek
 
Hello Vivek,

See samples there http://www.codeproject.com/info/sea...1=Search&author=&sd=15+Nov+1999&ed=3+Jun+2006

V> I am new to flash and want someone to guide me,
V> Is it possible to create a UI entirely in Flash and that will
V> inetract
V> with C# components (backend) and these components will in return
V> interact with database etc.
V> If flash and C# interaction is possbile then, what are the prons and
V> cons of this interaction?
V>
V> As using flash, one can create wonderful UI. But in return I also
V> want it to interact fully with C# components.
V>
V> Thanks in adv,
V> -vivek
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
I am new to flash and want someone to guide me,
Is it possible to create a UI entirely in Flash and that will inetract
with C# components (backend) and these components will in return
interact with database etc.

If flash and C# interaction is possbile then, what are the prons and
cons of this interaction?

As using flash, one can create wonderful UI. But in return I also want
it to interact fully with C# components.

That's possible but it depends on what kind of applications you want to do.
If you want to develop a desktop application with a Flash interface, you
can place the Flash ActiveX control on a Form. Then communicating between
flash and C# is easy (although very limited:
- Flash -> C#: in your action script, call the fscommand() method. This
will cause the ActiveX to raise the FsCommand event that can then be
handled by your C# program. fscommand takes 2 string as parameters so
you'll have to find a way to fit all the data you want to pass into 2
strings (for complex set of data, you'll probably want to pass XML string).
- C# -> Flash: you can use the SetVariable function of the ActiveX to set
an ActionScript variable value from C#. In Flash, place a watch on this
variable to be notified when its value has changed.

W've used this this technique to add a video-conferencing feature to our C#
application using Flash Media server and it works fine and it alowed us to
add video-conferencing in a matter of days instead of months. But i would
not recommend it to build a complete UI is Flash. Flash UI is just too
different from a normal Windows UI and this will surely cause loads of
confusion among your users. There are maybe a few very specific
applications that could benefit from having a Flash interface but don't
forget that there are third party C# UI component that can make a C#
application look great without having to use Flash. Plus, as we've seen
communication between Flash and C# is very limited so if you often have
loads of data to pass back and forth, this might become really messy.

If you're talking about web interfaces, then there are loads of examples on
the web that explain how to query an ASP or ASP .NET page from flash to
retrieve or pass data (typically, this is used to access a database).
 
Hi Mehdi,
thanks a lot for the information. Info is really helpful to keep prons
and cons of flash and .net interaction between two. yes, in our
application, there will be loads of data back and forth. and according
to you, it will basically become messy to control the data flow between
flash and c#. and more info you can give? it will be most probably a
desktop application. how complicated things are to use flash and .net?
like in our case, it might be like, flow of data will be coming and
backend(C#, .net) will try to populate these dynamic data on UI
(flash).

thanks in adv,
-vivek
 
thanks a lot for the information. Info is really helpful to keep prons
and cons of flash and .net interaction between two. yes, in our
application, there will be loads of data back and forth. and according
to you, it will basically become messy to control the data flow between
flash and c#. and more info you can give? it will be most probably a
desktop application. how complicated things are to use flash and .net?
like in our case, it might be like, flow of data will be coming and
backend(C#, .net) will try to populate these dynamic data on UI
(flash).

I'd suggest you to try it out and see if it could fit your goals. As i
said, interaction between Flash and C# is quite simple: FsCommand event to
send data from flash to C# and SetVariable for the opposite. The only
problem is that all you can pass around are strings so you'll need to
serialize the data into strings and deserialize it on the other end.
Whether it's gonna get messy or not really depends on what you're gonna do
and how you're going to do it so i can't really say.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top